It is currently April 27th, 2024, 11:40 am

Help! Why doesn't this work?

Get help with creating, editing & fixing problems with skins
dazzer13
Posts: 2
Joined: December 23rd, 2011, 5:38 pm

Help! Why doesn't this work?

Post by dazzer13 »

I have a skin for Spotify that has controls and want to put album art using Last Fm, but for some reason i can't get the webparser to work. i have used RainRefExp to check url and RegExp which both work fine. I am at a complete lost to why this doesn't work.

Please can someone help :-(

I know the Rest works by using just the commented URL so the problem has to lie with the webparser.

Code: Select all

[Variables]
;Variables used for getting album art. These are re-written on track change.
ARTIST=U2
TRACK=With Or Without You
Spotify=C:\Program Files (x86)\Spotify\spotify.exe

[MeasureMediaKey]
Measure=Plugin
Plugin=MediaKey.dll

; Gets the artist name from Spotify
[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying.dll
UpdateRate=1
PlayerName=Spotify
PlayerType=ARTIST

; Gets the track name from Spotify
[MeasureTrack]
Measure=Plugin
Plugin=NowPlaying.dll
UpdateRate=1
PlayerName=Spotify
PlayerType=TITLE

[MeasureCheckTrackChange]
Measure=Script
ScriptFile="#CURRENTPATH#CheckTrackChange.lua"
UpdateRate=1

[MeasurePlaying]
Measure=Plugin
Plugin=Plugins\WindowMessagePlugin.dll
WindowClass=SpotifyMainWindow
RegExpSubstitute=1
Substitute="Spotify - .*":";","Spotify":"4","0":"4"

[MeasureGetArt]
Measure=Plugin
Plugin=WebParser.dll
ForceReload=0
Url=http://lastfm-api-ext.appspot.com/2.0/?method=artist.getinfo&api_key=4f20dede76a3ef2f995acd85a1a01b29&artist=#ARTIST#&track=#TRACK#
RegExp=(?siU)<image size="extralarge">(.*)</image>.*</lfm>
;Url=http://upload.wikimedia.org/wikipedia/commons/thumb/6/66/SMPTE_Color_Bars.svg/320px-SMPTE_Color_Bars.svg.png
UpdateRate=3
StringIndex=1
Substitute="":"#CURRENTPATH#noart.png"
FinishAction=!Redraw
ErrorString="#CURRENTPATH#noart.png"
Download=1

[MeterArt]
Meter=IMAGE
MeasureName=MeasureGetArt
PreserveAspectRatio=1
ImageAlpha=255
X=260
Y=14
W=100
LeftMouseUpAction=!Execute ["#Spotify#"]
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Help! Why doesn't this work?

Post by smurfier »

Unless you have your script use !WriteKeyValue and perform a !Refresh, you can't use DynamicVariables with a plugin like that.

Are you aware that NowPlaying has a TrackChangeAction option?
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .