It is currently March 28th, 2024, 8:39 am

TrackChangeAction question for Web Radio Stream

Share and get help with Plugins and Addons
Post Reply
harrison3001
Posts: 6
Joined: October 29th, 2009, 9:02 pm
Location: Mandello del Lario
Contact:

TrackChangeAction question for Web Radio Stream

Post 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
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm
Contact:

Re: TrackChangeAction question for Web Radio Stream

Post by poiru »

What player are you using?
harrison3001
Posts: 6
Joined: October 29th, 2009, 9:02 pm
Location: Mandello del Lario
Contact:

Re: TrackChangeAction question for Web Radio Stream

Post by harrison3001 »

Thanks for the reply, I'm using Winamp.
harrison3001
Posts: 6
Joined: October 29th, 2009, 9:02 pm
Location: Mandello del Lario
Contact:

Re: TrackChangeAction question for Web Radio Stream

Post 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)
Attachments
LuaPlayerExt.zip
Simple Now Playing for Web Radios skin with Snarl notification. (Not Polished)
(112.81 KiB) Downloaded 162 times
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: TrackChangeAction question for Web Radio Stream

Post by smurfier »

Format your bangs in the lua script like this:
SKIN:Bang('!SetOption "MeterCoverString" "Text" """' ..sValue..'"""')
harrison3001
Posts: 6
Joined: October 29th, 2009, 9:02 pm
Location: Mandello del Lario
Contact:

Re: TrackChangeAction question for Web Radio Stream

Post 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
Attachments
LuaPlayerExt.zip
Fixed name with quotes for Mp3 playing, following smurfier directives, needs be polished and more testing to be complete, Snarl Notification needs to escape the quote too.
(112.81 KiB) Downloaded 171 times
Post Reply