rcalinjageman

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • 23. Dezember 2019 at 18:42 #47829

    I 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.

    7. Januar 2019 at 5:40 #43185

    After months of the Google Music plugin working perfectly, I had a reboot of my m2p and the plugin now loads but doesn’t seem to login correctly, showing an empty library that „reloads“ instantly. I mucked around with it a bit, and then tried burning a fresh image of the latest M2P..thought it would be easier to just start from scratch.

    Unfortunately, I am having problems:

    Here’s what I’m doing with the fresh install:
    * Latest M2P image (m2p_stretch_rpi_v247.img) for RPi 3BA on a new 64gb sd card
    * Check boot partition is expanded; it is
    * Install LMS Nightly 7.9 via M2P interface
    * Go though basic setup for LMS and play MP3s from attached USB drive –all looking good
    * Use M2P interface to install Google Music plugin:
    ** Install updates seem to stall when doing python setup of future… no further updates given for hours. But on second try, seems to install ok (logs below)
    ** Even though plugin does seem to be installed and activated on LMS, when entering user/pass/androidID from previous setup, I get „Not logged in to Google Play Music. Set your username and password.“ I know the info is correct, was working until last week with same androidID
    ** Try restarting LMS just in case… no change

    I’ve done this a couple times and also tried an older image of M2P I had around..no joy.

    Any help would be greatly appreciated.

    Cheers,

    Bob

    —here’s the output from the second attempt to install the plugin:

    Requirement already satisfied: validictory!=0.9.2,>=0.8.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==10.1.2)
    Requirement already satisfied: future in /usr/local/lib/python2.7/dist-packages (from gmusicapi==10.1.2)
    Requirement already satisfied: mock>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==10.1.2)
    Requirement already satisfied: python-dateutil!=2.0,>=1.3 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==10.1.2)
    Requirement already satisfied: decorator>=3.3.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==10.1.2)
    Requirement already satisfied: requests!=1.2.0,!=2.12.0,!=2.12.1,!=2.12.2,!=2.2.1,!=2.8.0,!=2.8.1,>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==10.1.2)
    Requirement already satisfied: mutagen>=1.34 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==10.1.2)
    Requirement already satisfied: MechanicalSoup>=0.4.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==10.1.2)
    Requirement already satisfied: setuptools in /usr/lib/python2.7/dist-packages (from protobuf>=3.0.0->gmusicapi==10.1.2)
    Requirement already satisfied: rsa>=3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==10.1.2)
    Requirement already satisfied: httplib2>=0.9.1 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==10.1.2)
    Requirement already satisfied: pyasn1-modules>=0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==10.1.2)
    Requirement already satisfied: pyasn1>=0.1.7 in /usr/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==10.1.2)
    Requirement already satisfied: pycryptodomex>=3.0 in /usr/local/lib/python2.7/dist-packages (from gpsoauth>=0.2.0->gmusicapi==10.1.2)
    Requirement already satisfied: funcsigs>=1; python_version < „3.3“ in /usr/local/lib/python2.7/dist-packages (from mock>=0.7.0->gmusicapi==10.1.2)
    Requirement already satisfied: pbr>=0.11 in /usr/local/lib/python2.7/dist-packages (from mock>=0.7.0->gmusicapi==10.1.2)
    Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests!=1.2.0,!=2.12.0,!=2.12.1,!=2.12.2,!=2.2.1,!=2.8.0,!=2.8.1,>=1.1.0->gmusicapi==10.1.2)
    Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests!=1.2.0,!=2.12.0,!=2.12.1,!=2.12.2,!=2.2.1,!=2.8.0,!=2.8.1,>=1.1.0->gmusicapi==10.1.2)
    Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests!=1.2.0,!=2.12.0,!=2.12.1,!=2.12.2,!=2.2.1,!=2.8.0,!=2.8.1,>=1.1.0->gmusicapi==10.1.2)
    Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests!=1.2.0,!=2.12.0,!=2.12.1,!=2.12.2,!=2.2.1,!=2.8.0,!=2.8.1,>=1.1.0->gmusicapi==10.1.2)
    Requirement already satisfied: beautifulsoup4 in /usr/lib/python2.7/dist-packages (from MechanicalSoup>=0.4.0->gmusicapi==10.1.2)
    Requirement already satisfied: lxml in /usr/lib/python2.7/dist-packages (from MechanicalSoup>=0.4.0->gmusicapi==10.1.2)
    Inline is up to date. (0.80)
    Inline::Python is up to date. (0.56)
    IO::Socket::SSL is up to date. (2.060)
    /var/lib/squeezeboxserver/Plugins /var/www/max2play/public
    /var/lib/squeezeboxserver/Plugins/GoogleMusic /var/lib/squeezeboxserver/Plugins /var/www/max2play/public
    Cloning into ‚.’…
    Restarting logitechmediaserver (via systemctl): logitechmediaserver.service.
    Finished installing Google Music Plugin

    GoogleMusic Plugin installed.
    Important: Now edit the settings of the Plugin within Squeezebox Server Settings, add your GoogleMusic credentials (including a mobile device ID!) and you are ready to go.

Viewing 2 posts - 1 through 2 (of 2 total)