Max2Play Home › Forums › Max2Play as Squeezebox (Player / Server) › Google Play Music – gmusicapi login not working anymore
Tagged: Google play music
- This topic has 4 replies, 4 voices, and was last updated 4 years, 11 months ago by flyboytyler premium.
-
21. November 2019 at 23:04 #47584
Hi,
since some weeks I cannot login to my Google Music account anymore via the gmusicapi. The problem is mentioned here as well:
https://github.com/squeezebox-googlemusic/squeezebox-googlemusic/issues/42There seems to be a solution:
https://forums.slimdevices.com/showthread.php?105800-Announce-Google-Music-plugin&p=951533&viewfull=1#post951533I would need help about how to upgrade gmusicapi to the recommended version.
Regards
macpac27. November 2019 at 14:08 #47611Hi macpac,
Thanks for sharing. The process will require SSH access and some fiddling.
However, Google has communicated that they will end their Google Play Music service in the near future and roll the service into YouTube Music which is currently replacing all Google Music services in slow succession. So you will most likely have to look for an alternative soon. We recommend trying out Spotify with the Spotty plugin for Squeezebox Server.
23. Dezember 2019 at 18:42 #47829I found a solution that seems to work (for now).
There is an updated version of the plugin on github (https://github.com/huubbouma/squeezebox-googlemusic). It uses an updated login method. I also includes a python-based proxy server that somehow solves issues with tracks stopping/ending.
Here’s what I did. This is specific for a max2play installation with the google-play-music plugin already installed.
* Following the directions for the plugin, I updated the GoogleMusicApi library
First I checked the version installed:
sudo pip show gmusicapi
Then I updated to 12.1.0 specifically
sudo pip2 install gmusicapi==12.1.0
* I cloned the updated plugin into /var/lib/squeezeboxserver/Plugins/:
cd /var/lib/squeezeboxserver/Plugins/ sudo git clone https://github.com/huubbouma/squeezebox-googlemusic</blockquote>
* I then swapped out the new plugin directory with the old one and made it a public directory (just in case):
sudo mv GoogleMusic GoogleMusic-old sudo mv squeezebox-googlemusic GoogleMusic sudo chmod 777 GoogleMusic
* Then I started squeezebox server, made sure the plugin was enabled, and went through the settings to authorize login with OpenAuth. At this point, I could reload my library, but songs wouldn’t start. The next step was to enable to python-based proxy server. You can do this temporarily with:
sudo python /var/lib/squeezeboxserver/Plugins/GoogleMusic/proxy/proxy.py
And viola – I could use the plugin again. However, when I closed the terminal the python-based proxy server stopped and tracks again wouldn’t load.
* So the last step I did was to setup the python-based proxy server as a service. I followed this tutorial https://tecadmin.net/setup-autorun-python-script-using-systemd/.
** First, I made a file called myproxy.system in /lib/systemd/system
sudo pico /lib/systemd/system/myproxy.service
With these contents:
[Unit] Description=Dummy Service After=multi-user.target [email protected] [Service] Type=simple ExecStart=/usr/bin/python /var/lib/squeezeboxserver/Plugins/GoogleMusic/proxy/proxy.py StandardInput=tty-force [Install] WantedBy=multi-user.target
** And then I reloaded systemd, enabled the new service, and started it:
sudo systemctl daemon-reload sudo systemctl enable myproxy.service sudo systemctl start myproxy.service
and checked the status with:
sudo systemctl status myproxy.service
The first time I did this the service was in a failed state. It turned out I had accidentally left an instance of the proxy server running from the command line so the service-based version couldn’t attach to the same port and failed. I killed the previous python thread and the service was able to start properly.
This seems to have done the trick. Don’t know yet it it will be super-stable, but fingers crossed. Haven’t tested this yet with having multiple players within the house playing different GPM tracks.
30. Dezember 2019 at 17:13 #47858Thanks for your detailed description, rcalinjageman! Trying to follow it I already stumbled at step one. I use the max2play Raspian buster image for the Pi 4. Installing gmusicapi via the max2play web interface doesn’t work out:
2019-12-30 16:11:03 squeezeboxserver_safe started. [19-12-30 16:11:05.5463] main::init (387) Starting Logitech Media Server (v7.9.2, 1576909043, Sat Dec 21 07:45:41 CET 2019) perl 5.028001 - arm-linux-gnueabihf-thread-multi-64int [19-12-30 16:11:06.9329] Slim::bootstrap::tryModuleLoad (287) Warning: Module [Plugins::GoogleMusic::Plugin] failed to load: Error -- py_eval raised an exception at /usr/lib/arm-linux-gnueabihf/perl5/5.28/Inline/Python.pm line 177. BEGIN failed--compilation aborted at /usr/share/squeezeboxserver/Plugins/GoogleMusic/GoogleAPI.pm line 74. Compilation failed in require at /usr/share/squeezeboxserver/Plugins/GoogleMusic/Settings.pm line 20. BEGIN failed--compilation aborted at /usr/share/squeezeboxserver/Plugins/GoogleMusic/Settings.pm line 20. Compilation failed in require at /usr/share/squeezeboxserver/Plugins/GoogleMusic/Plugin.pm line 24. BEGIN failed--compilation aborted at /usr/share/squeezeboxserver/Plugins/GoogleMusic/Plugin.pm line 24. Compilation failed in require at (eval 895) line 1. BEGIN failed--compilation aborted at (eval 895) line 1.
Any help on this?
2. Januar 2020 at 19:21 #47864How does one perform this step?
„went through the settings to authorize login with OpenAuth“
-
You must be logged in to reply to this topic.