Paul Webster wrote: 
> I am interested to know how this is fixed because it might help me with
> an issue that has been raised with my Radio France plugin where
> (broadly) the stations in the playlist for future play show what is
> playing on the station rather than the station info.
It was a stupid bug that stopped it working. 

But this is essentially how you do it :

-  You have a protocol handler with a getMetaDataFor (which is a static
method) that provides the metatdata for the url of the track that needs
to play.
-  You have code in the non static methods that places the meta data on
the current "song" for an instance of the protocol handler
-  If the url is currently playing the getMetaDataFor returns the
metadata from the "song" that the client is currently playing
-  If the url is not playing  (in the playlist) the method goes off and
gets the metadata for the url and puts it in the cache for a day (so it
doesn't need to bother the external API again)
-  From then on when getMetaDataFor is called for an Url that is not
playing it gets it from the cache (until the next day) 

This it the branch with the fix in, see getMetaDataFor in there :
https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin/blob/2.6fixes/BBCSounds/ProtocolHandler.pm


------------------------------------------------------------------------
expectingtofly's Profile: http://forums.slimdevices.com/member.php?userid=63263
View this thread: http://forums.slimdevices.com/showthread.php?t=113045

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to