How to sniff out a streaming URL

Questions comments and suggestions for MusicLobby 3.75
User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: How to sniff out a streaming URL

Postby CinemarDave » Sat Sep 17, 2011 9:44 am

I don't understand how it is backwards but just do your own look up from an automation rule. Whenever the artist name changes issue the following MLWorker command. Substitute the values in <<>> with your server variable names. Note: The <<OUTPUTVARIABLENAME>> does NOT have {{ }} around it

MLWorker|GetAlbumCover~{{<<ARTISTNAME>>}}~{{<<SONG>>}}~~300~300~\Images\Music\InternetRadio.jpg~<<OUTPUTVARIABLENAME>>~{{clientname}}

User avatar
simonmason
Expert
Expert
Posts: 855
Joined: Tue Dec 26, 2006 9:06 pm
Contact:

Re: How to sniff out a streaming URL

Postby simonmason » Sun Sep 18, 2011 7:54 am

Ok, this works. It is indeed a mystery as to why it is backwards - all other streams seem to work just fine.

I have one other logic issue. I need to copy this file into another variable after the lookup has occurred:

SetVariable|music_currentalbumcoverart_CHA4~{{music_currentalbumcoverart_2}}

Currently when I run this on currentartistname change it runs too quickly - presumably the cover lookup in Amazon has not finished by the time the next automation rule fires copying the file. Is there a way to insert a delay into an automation rule?

On the subject, how does one control the order of automation rules - is it simply the order that they appear in the window?
Simon D. S. Mason

User avatar
simonmason
Expert
Expert
Posts: 855
Joined: Tue Dec 26, 2006 9:06 pm
Contact:

Re: How to sniff out a streaming URL

Postby simonmason » Sat Sep 21, 2013 4:48 pm

I am just updating some code around this stream and I wanted to issue the GetFanArt call as well. Is this:

MLWorker|GetFanArt~{{<<ARTISTNAME>>}}~~300~300~\Images\Music\InternetRadio.jpg~<<OUTPUTVARIABLENAME>>~{{clientname}}

right? Thanks.
Simon D. S. Mason

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: How to sniff out a streaming URL

Postby CinemarDave » Sat Sep 21, 2013 4:57 pm

GetFanArt is only a V4 option. Does not work in the old V3 world.

User avatar
simonmason
Expert
Expert
Posts: 855
Joined: Tue Dec 26, 2006 9:06 pm
Contact:

Re: How to sniff out a streaming URL

Postby simonmason » Sat Sep 21, 2013 5:52 pm

Sorry. I am using 4. Just responded to this thread to avoid explaining what I am doing!
Simon D. S. Mason

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: How to sniff out a streaming URL

Postby CinemarDave » Sat Sep 21, 2013 6:36 pm

Then use the MLServer built-in command

GetArtistFanart|Artist~ServerVar~DefaultImage~FlagVariable

However there should never be a need to manually call this command because all the music and radio apps automatically generate the fan art if a match can be found.

If you have MLWorker installed you can get rid of it. Nothing in V4 uses MLWorker.

User avatar
simonmason
Expert
Expert
Posts: 855
Joined: Tue Dec 26, 2006 9:06 pm
Contact:

Re: How to sniff out a streaming URL

Postby simonmason » Sun Sep 22, 2013 8:00 am

Thanks - my specific use case, which I think warrants the use of the command, the stream in question has reversed artist and title. So the FanArt brings back pictures based on the title of the song - which can be entertaining but also a little weird.

I have an automation rule that fires if the stream id matches, and when the song title changes. This in turn calls a timer that waits for 5 seconds - assuming the automatic FanArt call is running first - and then calls the second fanart command feeding it the song title.

Everything appears to be running as planned, but I need to confirm the syntax of the GetArtistFanArt as this is not working:

GetArtistFanArt~{{radio_1_nowplaying_song}}~music_currentfanart_CHA6~~250~250~\Images\Music\InternetRadio.jpg~{{GetArtistFanArtFlag}}

Thanks.
Simon D. S. Mason

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: How to sniff out a streaming URL

Postby CinemarDave » Sun Sep 22, 2013 10:46 am

You are passing too many variables. See the command builder syntax. There is no automatic re-sizing of the images. If you need them scaled then it should be wrapped in the GetImage call on the client.

GetArtistFanart|Artist~ServerVar~DefaultImage~FlagVariable

User avatar
simonmason
Expert
Expert
Posts: 855
Joined: Tue Dec 26, 2006 9:06 pm
Contact:

Re: How to sniff out a streaming URL

Postby simonmason » Sun Sep 22, 2013 11:17 am

Sorry. I was just in command builder for something else and didn't think to look for this. Didn't do any work during the summer so I am a little rusty!
Simon D. S. Mason


Return to “MusicLobby 3.75”

Who is online

Users browsing this forum: No registered users and 1 guest