Re: scanUrl not being called

expectingtofly <expectingtofly.a1uovz-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
Paul Webster wrote: 
> 
> If I play the same final stream url in LMS then it works fine.
> It looks to me like the line
> > 
Code:
--------------------
  >   > $song->streamUrl($streamUrl);
--------------------
> > 
> did not change the song data so LMS tried to create a command line to
> handle myplugin: which failed.
> 
> Sorry for the trouble.
> I don't want to share the exact stream URL in public for reasons that
> I am happy to explain via PM or email.
> I can share the current code if an expert is willing to take a look
> offline.


Ah yes, that rings a bell.   Scanurl gets called first, and it tries to
use the customized url.   
So, what you need to do is override scanUrl and call up to the real
scanUrl ensuring you pass in the real url into that method.
However, there is a complication, if I remember correctly, that there is
a callback method that is passed in thorugh args.   You have to make
sure that the customized url is passed into that rather than the real
url so you have to do some interception and replace that callback
function with one that does the callback with the real url.   I remember
that caused me pain at the time!
You should just need to copy what I've done in the virgin radio protocol
handler (of course replacing the logic that works out the real url with
your own)

https://github.com/expectingtofly/LMS_Virgin_Radio_Plugin/blob/e65ccccb91f29f219c25b85b3268f0eb566c9448/VirginRadio/ProtocolHandler.pm#L638



Stuart McLean   

EXPECTINGTOFLY PLUGINS :
    
- *BBC Sounds* : 
  https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin 
- *Virgin Radio (UK)* : 
  https://github.com/expectingtofly/LMS_Virgin_Radio_Plugin 
- *Times Radio* : 
  https://github.com/expectingtofly/LMS_TIMES_RADIO_PLUGIN 
- *Global Player (UK)* : 
  https://github.com/expectingtofly/LMS_GlobalPlayer_Plugin 
  
For BBC Sounds help see the 'BBC Sounds Wiki'
(https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin/wiki).
------------------------------------------------------------------------
expectingtofly's Profile: http://forums.slimdevices.com/member.php?userid=63263
View this thread: http://forums.slimdevices.com/showthread.php?t=114599
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.