Now I wanted to try to use NowPlaying plugin.
I do not need the repeat / shuffle function but I would like to have the album art!
To get the album art I was planning to use Last.fm API. It's free of use so I registered and got the API key.
Then I started RainRegExp for the parsing and used:
URL: http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=4e7773d5b02916ac17a5f95fdd604xxx&artist=Beach House&track=Lazuli
(note: the last 3 numbers of the API key are replaced by xxx)
and
Regexp: (?siU)<image size="medium">(.*)</image>
This gives me the string of the album art URL: 1 => https://lastfm.freetls.fastly.net/i/u/64s/90ff02d4495f4c50a1b7b2a64798d892.png When I insert this URL in EDGE I see the album art displayed.
OK this is working I thought...so I started coding in rainmeter as follows:
Code: Select all
[Rainmeter]
update=1000
[Variables]
Artist=
Track=
ArtURL=https://lastfm.freetls.fastly.net/i/u/64s/90ff02d4495f4c50a1b7b2a64798d892.png
fontface=Verdana
stringstyle=normal
stringeffect=none
stringalign=right
fontcolor=ffffff
fonteffectcolor=000000
--------------------- Measures
[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=Spotify
PlayerType=ARTIST
Substitute="":"N\A"
[MeasureTrack]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=Spotify
PlayerType=TITLE
Substitute="":"N\A"
OnChangeAction=[!SetVariable Artist "[MeasureArtist]"][!SetVariable Track "[MeasureTrack]"][!CommandMeasure MeasureGetArtURL "UpDate"]
[MeasureGetArtURL]
;UpdateDivider=-1
Measure=WebParser
Url=http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=4e7773d5b02916ac17a5f95fdd604xxx&artist=#Artist#&track=#Track#
RegExp=(?siU)<image size="medium">(.*)</image>
StringIndex=1
FinishAction=[!SetVariable ArtURL "[MeasureGetArtURL]"][!CommandMeasure MeasureGetArt "Update"]
DynamicVariables=1
[MeasureGetArt]
UpdateRate=-1
Measure=WebParser
URL=#ArtURL#
Download=1
DynamicVariables=1
------------- Meters
[MeterArt]
Meter=IMAGE
MeasureName=MeasureGetArt
ImageRotate=-20
X=300
Y=58
H=159
W=159
antialias=1
Tile=0
PreserveAspectRatio=2
SolidColor=0,0,0,200
[MeterTrack]
Meter=STRING
StringAlign=#stringalign#
MeasureName=MeasureTrack
X=-5r
Y=r
FontColor=#fontcolor#
fonteffectcolor=#fonteffectcolor#
stringeffect=#stringeffect#
stringstyle=#stringstyle#
FontSize=14
FontFace=#fontface#
AntiAlias=1
[MeterArtist]
Meter=STRING
StringAlign=#stringalign#
MeasureName=MeasureArtist
X=r
Y=40r
FontColor=#fontcolor#
fonteffectcolor=#fonteffectcolor#
stringeffect=#stringeffect#
stringstyle=#stringstyle#
stringcase=upper
FontSize=12
FontFace=#fontface#
AntiAlias=1
dynamicvariables=1