hechtus / squeezebox-googlemusic

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

Does not automatically find iOS phone #24

Closed agillis closed 10 years ago

agillis commented 10 years ago

I tested squeezebox-googlemusic today and works well. I have an iPhone not Android so the config GUI did not find my Mobile Device ID automatically. I needed to run mobile_devices.py.

Once I entered my iPhone id it worked great. Maybe it could find iPhone ids automatically. The ID looks like this ios:0123456789abcdef

hechtus commented 10 years ago

Hi, thanks for reporting this. Could you please paste the exact output of mobile_device.py here.

agillis commented 10 years ago

This is the output of mobile_device.py for my iPhone 5s

Monkey | None | IOS | ios:0123456789abcdef

hechtus commented 10 years ago

OK. Interesting. And how did you enter the device ID? With or without the "ios:" prefix to make it work?

agillis commented 10 years ago

I entered this to get it working

ios:0123456789abcdef

I did not try it without the ios: I'll test that today.

hechtus commented 10 years ago

OK, but you need to check, that you can really play songs. The device ID is used to get the stream URL of a song. If it's not correct, a song cannot be played back.

agillis commented 10 years ago

I did some more testing today. This is the test and the results. This is the output from my mobile_devices.py

OfficePC | None | DESKTOP_APP | 00:2B:63:9B:C2:EB vortexbox.localdomain (gmusicapi-3.1.1-dev) | None | DESKTOP_APP | D0:22:84:BC:AD:79 Monkey | None | IOS | ios:0123456789abcdef

So ios:0123456789abcdef or 0123456789abcdef both work. The desktop apps with MAC addresses do not.

Test

Go to the google plug-in setting page and enter my account and the Mobile Device ID to be tested.

  1. Go to the plug-in menu and select "Reload Libary". Make sure all my tracks are listed.
  2. Play a track

Results

ios:0123456789abcdef

  1. OK
  2. OK

0123456789abcdef

  1. OK
  2. OK

00:2B:63:9B:C2:EB

  1. OK
  2. track does not play. Get error in logs [14-01-31 10:29:14.6458] Plugins::GoogleMusic::ProtocolHandler::getNextTrack (98) Looking up stream url for url googlemusic:track:6974994c-ce01-3e22-8938-9d1ec942675e failed.

D0:22:84:BC:AD:79

  1. OK
  2. track does not play. Get error in logs [14-01-31 10:29:14.6458] Plugins::GoogleMusic::ProtocolHandler::getNextTrack (98) Looking up stream url for url googlemusic:track:6974994c-ce01-3e22-8938-9d1ec942675e failed.
agillis commented 10 years ago

I like the way it creates a new player for squeezebox-googlemusic (called gmusicapi) It's to bad you need to have an ID from an iphone or android app to make squeezebox-googlemusic work. The web based player doesn't seem to need and ID.

hechtus commented 10 years ago

Thank you very much for testing! So, I will add some code to allow IOS device ids to be configured automatically.

You are right. It's a pity that you will need a mobile device to use the plugin. But the webclient API which does not need a mobile ID does not easily support all access streaming. It splits up all access tracks into small pieces. Furthermore, it is quite unstable. You may have a look at the documentation of the Python gmusicapi.

As a workaround you may also run an Android emulator in a virtual machine to generate a device ID and register this at Google music. It works. :-)

Another thing I like to mention is that I'm extremely happy to see that you included this plugin into vortexbox. But please do not use the master branch, but the correct release tag. The current release tag is v0.3.2. At the moment the master branch is under heavy development. I'm continuing v0.3 releases on the v0.3 branch.

agillis commented 10 years ago

OK I updated VortexBox to use your 0.3.2 branch.

hechtus commented 10 years ago

Great! Thanks. And yes, PC MAC addresses unfortunately do not work as device IDs.

hechtus commented 10 years ago

Please check out the new release v0.3.3