It is currently April 24th, 2024, 4:23 pm

Winamp plugin

Share and get help with Plugins and Addons
Jan3A1r
Posts: 4
Joined: January 29th, 2010, 11:51 pm

Winamp plugin

Post by Jan3A1r »

Image
Hi everyone!

While I was writing my own rainmeter config, at one moment I realized, that I actually need a good winamp plugin with ability to display album, track, time, COVER, etc... Ofc, there is a trick to invoke WebParser and web control for winamp, but I found it, uhm, not a very good way :)

So, I coded a small plugin, that has an ability to parse album, artist, ... and download and display covers. Right now I use seekacover.com & google images, but this can be easily changed via sources.

My plugin has only one setting that is called "Retrieve".

Retrieve = 0 will result in downloading cover and therefore you can make it in a way like

Code: Select all

Meter = IMAGE, ImageName = [MeasureCover]

Retrieve = 1,2,3
means getting an Artist, Album and Track captions accordingly. I capture these via window caption, so you should change winamp song captioning option to [%artist% - ][%album% - ]$if2(%title%,$filepart(%filename%)) '['%filename%']'

Retrieve = 4,5 means getting elapsed time and total track time in format 'x.xx' (can be changed via sources).

Here is a part of my config that uses winamp plugin:

Code: Select all

; Measures
; --------
[MeasureCover]
Measure = Plugin
Plugin = Plugins\WinampPlugin.dll
Retrieve = 0

[MeasureArtist]
Measure = Plugin
Plugin = Plugins\WinampPlugin.dll
Retrieve = 1

[MeasureAlbum]
Measure = Plugin
Plugin = Plugins\WinampPlugin.dll
Retrieve = 2

[MeasureTrack]
Measure = Plugin
Plugin = Plugins\WinampPlugin.dll
Retrieve = 3

[MeasurePos]
Measure = Plugin
Plugin = Plugins\WinampPlugin.dll
Retrieve = 4

[MeasureLen]
Measure = Plugin
Plugin = Plugins\WinampPlugin.dll
Retrieve = 5

; Meters
; ------
[Line]
Meter = IMAGE
SolidColor = #ColorBorder#
X = 0
Y = 0
W = 180
H = 1

[MeterCover]
Meter = IMAGE
ImageName = [MeasureCover]
DynamicVariables = 1
LeftMouseDownAction=!RainmeterRefresh
AntiAlias = 1
X = 50
Y = 10
H = 80
W = 80

[Title]
Meter = STRING
MeasureName = MeasureTrack
Text = "%1"
FontFace = #Font#
FontColor = #Color1#
FontSize = 8
AntiAlias = 1
ClipString = 1
X = 5
Y = 90r
W = 180
H = 15

[Artist]
Meter = STRING
MeasureName = MeasureArtist
MeasureName2 = MeasureAlbum
Text = "%1 - %2"
FontFace = #Font#
FontColor = #Color2#
StringStyle = Italic
FontSize = 8
AntiAlias = 1
ClipString = 1
X = 5
Y = 15r
W = 180
H = 15

[Time]
Meter = STRING
MeasureName = MeasurePos
MeasureName2 = MeasureLen
Text = "%1 | %2"
Substitute = "0.00 | ":""
FontFace = #Font#
FontColor = #Color2#
FontSize = 7
AntiAlias = 1
ClipString = 1
X = 5
Y = 15r
W = 200
H = 15

The plugin and its sources come in attachment. Any feelings/ideas appreciated :)
Note that you have to put libcurl.dll in your Rainmeter program folder for this plugin to work.


Updated once again - Found one stupid bug with song name parsing, now it's ok...

Updated - added Retrieve = 4, 5 to get song time
Now this plugin works as CD Art display does (first search the file folder for cover, if there are no covers, download one).
Last edited by Jan3A1r on February 6th, 2010, 2:25 pm, edited 1 time in total.
User avatar
Digi
Posts: 46
Joined: December 24th, 2009, 10:35 pm

Re: Winamp plugin

Post by Digi »

itsound good mate but how u get it to work? itsnt a skin is it? how to get to work with a skin?
[url=http://www.rainmeter.net/forum/viewforum.php?f=85][center][b]H.E.R.O[/b][/center][/url]
[url=http://www.rainmeter.net/forum/viewtopic.php?f=83&t=1525][center][b]V.I.S.O.R[/b][/center][/url]
[url=http://www.rainmeter.net/forum/index.php][center][b]Rainmeter Help[/b][/center][/url]
Jan3A1r
Posts: 4
Joined: January 29th, 2010, 11:51 pm

Re: Winamp plugin

Post by Jan3A1r »

It's a plugin, same as WebParser or WindowMessage are.

Just take a look at the sample config provided... You use it in Measures, where Measure = Plugin, and Plugin = WinampPlugin.dll. You also provide Retrieve = X, where X = 0 - 5 as described above.

The only thing you have to do after is bind it to a Meter = Image if you have Retrieve = 0 or Meter = String for others. Cheers :)
User avatar
Digi
Posts: 46
Joined: December 24th, 2009, 10:35 pm

Re: Winamp plugin

Post by Digi »

Jan3A1r wrote:It's a plugin, same as WebParser or WindowMessage are.

Just take a look at the sample config provided... You use it in Measures, where Measure = Plugin, and Plugin = WinampPlugin.dll. You also provide Retrieve = X, where X = 0 - 5 as described above.

The only thing you have to do after is bind it to a Meter = Image if you have Retrieve = 0 or Meter = String for others. Cheers :)

thanks alot mate..well see how i get on :thanks:
[url=http://www.rainmeter.net/forum/viewforum.php?f=85][center][b]H.E.R.O[/b][/center][/url]
[url=http://www.rainmeter.net/forum/viewtopic.php?f=83&t=1525][center][b]V.I.S.O.R[/b][/center][/url]
[url=http://www.rainmeter.net/forum/index.php][center][b]Rainmeter Help[/b][/center][/url]
sinicure
Posts: 3
Joined: February 10th, 2010, 10:55 am

Re: Winamp plugin

Post by sinicure »

I would love more information on this. I put the dll's in the plugin folder, and then copied your config and made an .ini file to load up (maybe this is wrong) but anyways I get an error that the WinampPlugin.dll is not found although the path it looks in is where I have it. Any chance you could make a simple ini file that works and then I could customize it from there?
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Winamp plugin

Post by jsmorley »

sinicure wrote:I would love more information on this. I put the dll's in the plugin folder, and then copied your config and made an .ini file to load up (maybe this is wrong) but anyways I get an error that the WinampPlugin.dll is not found although the path it looks in is where I have it. Any chance you could make a simple ini file that works and then I could customize it from there?
That error means you are using a 32bit plugin on a 64bit system or visa versa. Not going to work if the plugin is not compiled for the same OS you are using.
sinicure
Posts: 3
Joined: February 10th, 2010, 10:55 am

Re: Winamp plugin

Post by sinicure »

jsmorley wrote:
That error means you are using a 32bit plugin on a 64bit system or visa versa. Not going to work if the plugin is not compiled for the same OS you are using.

Bummer!... I'm running x64.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Winamp plugin

Post by jsmorley »

sinicure wrote:
Bummer!... I'm running x64.
You can run 32bit Rainmeter on 64bit Windows, but it must be all one or the other. You can't mix 32bit plugins with 64bit Rainmeter.
Sylvane
Posts: 21
Joined: June 7th, 2009, 5:46 pm
Location: England, UK

Re: Winamp plugin

Post by Sylvane »

This plugin is doing odd things for me. First of all, I had the same problem that sinicure had, so I decided I'd just upgrade my 1.1 64bit version of Rainmeter to 1.2 32bit. That seemed to fail to work, so I went back to 1.1 32bit, now I can open the plugin and use the code attached in the first post...but only until I open a track in Winamp. That causes Rainmeter to immediately crash with the following error:

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Runtime Error!

Program: C:\Program Files\Rainmeter\Rainmeter.exe



This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


---------------------------
OK
---------------------------

Has this problem been seen before? I'm running Windows 7 x64 Home Premium.
DeviantArt Profile - http://rasylver.deviantart.com/
Rawr
Posts: 3
Joined: January 17th, 2010, 7:16 pm

Re: Winamp plugin

Post by Rawr »

Works great... but I keep getting the same error - no problem until I run winamp. I'm using 32-bit windows and everything and the plug-ins are all in the right place. Any help? Means I can't make a winamp skin now! It was working fine up until recently.