hechtus / squeezebox-googlemusic

Squeezebox (Logitech Media Server) Plugin for Google Play Music
103 stars 24 forks source link

Slim::Player::Song::open (471) Warning: stream failed to open #102

Open Bucklew opened 7 years ago

Bucklew commented 7 years ago

Hello,

I had the old plugin from Hechtus working for several months but now suddenly not anymore. Got the following error:

Slim::Player::Song::open (471) Warning: stream failed to open

After some Debugging noticed that the Plugin gets an https://-Link from Google to Download the file but uses the Handler for an unencrypted HTTP-Session:

Slim::Player::Protocols::HTTP::canDirectStream (267) [xx:xx:xx:xx:xx:xx] Not direct streaming because player is synced Slim::Player::Song::open (461) Opening stream (no direct streaming) using Plugins::GoogleMusic::ProtocolHandler [googlemusic:track:xxxxx] Plugins::GoogleMusic::ProtocolHandler::new (36) Remote streaming Google Music track: https://r1---sn-4g5edn7l.c.doc-0-0-sj.sj.googleusercontent.com/videoplayback?xxxx Slim::Formats::RemoteStream::request (148) Response: Slim::Formats::RemoteStream::request (152) Warning: Invalid response code () from remote stream https://

Therefore i changed the ProtocolHandler.pm in line 5 from HTTP to HTTPS:

use base qw(Slim::Player::Protocols::HTTP); to use base qw(Slim::Player::Protocols::HTTPS);

Now it is working again as a charme :)

If you don't want use SSL for the transmission, you can also change the https:// in the URL to http:// automatically by adding the following line somewhere after line 33:

#$streamUrl =~ s/https/http/g;

But i prefer using HTTPS.

davewongillies commented 6 years ago

There's a fix for this over in https://github.com/squeezebox-googlemusic/squeezebox-googlemusic/pull/16 which still needs to be merged.

davewongillies commented 6 years ago

I've raised another PR https://github.com/squeezebox-googlemusic/squeezebox-googlemusic/pull/25 to fix this. I've tested it on 7.8.1 and 7.9.1 and it works on both versions.

davewongillies commented 6 years ago

https://github.com/squeezebox-googlemusic/squeezebox-googlemusic/pull/25 has been merged. For anyone having this issue, please use the plugin from https://github.com/squeezebox-googlemusic/squeezebox-googlemusic instead of this repo.