Bugzilla – Bug 17920
TuneIn Radio Options Context Menu - Results returned are unnecessarily limited and frequently 'not available'
Last modified: 2013-05-16 13:26:29 UTC
Created attachment 7647 [details] Proof of concept patch The TuneIn Radio Options context menu provides a very useful browser that gives access to a Radio station's schedule, past shows/programme episodes currently available for playing, and a 'You may like' link. Unfortunately the results returned are: a) Limited to WMA & MP3 streams This cuts out content available in AAC or other formats. b) Somewhat useless when when one is exercising the option from a show or episode The response returned is frequently: 'The requested item is not available'. I find that the attached patch gives much improved results on my local LMS server. The changes are: 1) Format limitation Provides a 'formats' parameter to the "http://opml.radiotime.com/Options.ashx" API. This is generated using the same methodology as Slim::Plugin::InternetRadio::Plugin. This demonstrably widens the results returned in the UK, where I am based, and where the BBC provides a number of higher quality AAC streams. But the principle is generally applicable. 2) Shows/episodes The problem here appears to be with using the value of the 'id' parameter specified in the RadioTime stream URL as the value of the 'id' parameter provided to the "http://opml.radiotime.com/Options.ashx" API. I observe that, when the track being played is a show or episode, RadioTime provides an additional 'sid' parameter in its stream URL. This 'sid' appears to refer back to the originating show, or station. Setting the 'id' parameter provided to "Options.ashx" to the value of this stream 'sid' parameter provides a much better result. Where a regular live radio stream is being played, I observe that no 'sid' is provided. In that case use of the RadioTime stream URL's 'id' does appear to be appropriate. I haven't confirmed this against RadioTime's published API, as access to that now requires registration, and I have not chosen to register. 3) Other The patch also returns a 'userName' parameter if contained within the stream, and carries a check against an undefined $client parameter. I don't know that these are necessary.
Thanks! commit c5c91277dd28886e9fed13af100a3b9546ebf894
Excellent ! I look forward to trying it out.