Page 1 of 1

TrackChangeAction question for Web Radio Stream

Posted: February 7th, 2012, 4:38 pm
by harrison3001
Hi to all. I'm writing a skin especially dedicated to Web Radio with Lua script to dynamically change the cover for a specified radio channel + snarl notifications through Snarl_CMD.exe or growlnotify (it crashes when passing the icon for the cover , i don't know, maybe for the file extension). Everything is working fine (with some headache, novice on Lua), track change for mp3s is perfect + a timer through a counter (thanks to poiru) that waits the stream to load ... the question: Is there a way to catch the song change when playing a radio stream, it seems only to work when changing between an mp3 play and a stream play (at first only).

I was thinking about to monitor the Artist value of a measure for example through Lua, when it changes i set the a bang, how can i do this?

The skin is almost ready and functional aside the web radio song change, to be clear when i change the stream everything is OK, i have to polish it and optionally add the speaking feature (it speaks the artist and title on song change). I will advice here when is ready and upload it to DeviantArt as soon as possible (this week i think). Please suggest. Thanks to everyone around here. Andrea. :D

Re: TrackChangeAction question for Web Radio Stream

Posted: February 12th, 2012, 7:07 am
by poiru
What player are you using?

Re: TrackChangeAction question for Web Radio Stream

Posted: February 12th, 2012, 3:08 pm
by harrison3001
Thanks for the reply, I'm using Winamp.

Re: TrackChangeAction question for Web Radio Stream

Posted: February 12th, 2012, 3:31 pm
by harrison3001
I attach the skin here, is not yet polished and i have also problems with songs/album name with "" inside, i can't find a way to pass the correct name through the Lua script, using print(VariableName) for debugging it prints the string correctly for example "The Song" but passing it to the meter it finds only "The" .. i can't escape the space :(. Another thing it seems to not work is the bang !Refresh i need to re-set the variables when i switch from mp3 and web radio. Take a look i you can. Thanks!!!
(included Snarl_CMD.exe)

Re: TrackChangeAction question for Web Radio Stream

Posted: February 12th, 2012, 8:38 pm
by smurfier
Format your bangs in the lua script like this:
SKIN:Bang('!SetOption "MeterCoverString" "Text" """' ..sValue..'"""')

Re: TrackChangeAction question for Web Radio Stream

Posted: February 13th, 2012, 10:27 pm
by harrison3001
FANTASTIC You are a master!!! I resolved the album name Lounge Cafè Tunis "Sahria" by Ben Oyhman (at Jamendo if you want to listen to) with this:
SKIN:Bang('!SetOption "MeterFile" "Text" """' ..sAlbumValue) added only two " more (three total).
Thanks a lot!!! It remains the song change when listen to web radio and the refresh bang to solve but they are minor issues. I will polish and upload, also on dA.
Feel free to contact @harrison3001.
Andrea