tephlon wrote: 
> <tl;dr>Could the problem be that the plugin does not follow 302
> redirects?</tl;dr>
> 
> I installed murkle's patched plugin yesterday - thank you for trying to
> solve the problem! - but it still didn't work for me. So, in frustration
> I had a quick look at the ProtocolHandler.pm module and switched on
> debug logging for the plugin. I noticed that the plugin logged that the
> stream ended, immediately after it had started to read it (or tried to
> open it). So, I had a look at the network traffic using tcpdump and
> wireshark. 
> 
> The plugin makes a few requests, first downloading the youtube video
> page, from which it parses out the relevant video urls. After some steps
> it tries to start a video stream, which it will read the audio from on
> the fly. What happened in the packet dumps that I got, was that it sent
> an http request for the video stream, but got a 302 response from the
> server, after which it just logged that the stream ended. I guess it
> tried to read the video stream data from the 302 response (oops),
> instead of actually following the redirect.
> 
> The ProtocolHandler.pm module uses the Slim::Networking::SimpleAsyncHTTP
> module for fetching the urls. Looking at that module, it only has code
> for 304 responses, which might explain it all. On the other hand, the
> Slim::Networking::SimpleAsyncHTTP module does load the
> Slim::Networking::Async::HTTP module, which has support for redirects.
> I'm not a Perl person so I cannot see if it actually uses that code - I
> assume it's not, since it doesn't follow the redirects :p
> 
> The redirects I noticed in my few test cases was that I got redirected
> to a stream url which *only* differed from the original url by the
> appending of the string "&ir=1&rr=12". From this I made the probably
> moronic change
> > 
Code:
--------------------
  >   > 
  > #$url .="&signature=$props{signature}";
  > $url .="&signature=$props{signature}&ir=1&rr=12";
--------------------
> > 
> to ProtocolHandler.pm, and now my plugin works again :p
> 
> I got to thinking, could this problem - not following redirects -
> explain the problems with this plugin? Or I've misunderstood
> everything :p

The problems I was fixing were '403 - Forbidden error messages', due to
the urls not being generated properley. I just applied your change and
it's made no difference whatsoever so I suppose it should go in if
people are getting redirects often.

I still see the 'need to press play a couple of times' problem most of
the time. I'm not sure what causes that, but its probably something more
fundamental than just a malformed url.


------------------------------------------------------------------------
murkle's Profile: http://forums.slimdevices.com/member.php?userid=40710
View this thread: http://forums.slimdevices.com/showthread.php?t=87731

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to