Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Where to login Google music
#21
Try with this maybe:

Code:
sudo pip3 install gmusicapi
Reply
#22
(03-28-2020, 04:42 PM)TookaFace Wrote: Try with this:

Code:
sudo pip3 install gmusicapi

Just beat me to it.

@Lttlwing16
The 'pip' command is the package manager for Python 2. If you want to install Python 3 packages use 'pip3'
That said installing the Python3 package of gmusicapi with "sudo pip3 install gmusicapi" did nothing to the upnp config screen on my Moode.

So Iogging in to the Pi via SSH and editing /var/www/upp-config.php (e.g. "sudo nano /var/www/npp-config.php") to change line 75 from;

Code:
$result = sysCmd('/var/www/command/util.sh check-dir "/usr/local/lib/python2.7/dist-packages/gmusicapi"');

to...
Code:
$result = sysCmd('/var/www/command/util.sh check-dir "/usr/local/lib/python3.7/dist-packages/gmusicapi"');

... did the trick. The UPnP config screen now shows the Google Music credentials fields.

I don't have a Google Music subscription to test but hope that works for you.
Maybe that and the advice shown in the UPnP config screen could be updated for the next release if it works.
Reply
#23
(03-28-2020, 03:55 PM)Lttlwing16 Wrote: So currently, there is no easy way to build the gmusicapi for Moode? I attempted installing older versions, but they all failed, all relying on Python 3.5 or higher.

If I get a chance I'll look at this tonight. It can't be too hard to sort out; just need to be sure of the details.

I gave up my Google Music subscription so can only test that gmusicapi compiles.

NVM - I didn't notice TookaFace and vinnn took care of it.
Reply
#24
(03-28-2020, 04:48 PM)vinnn Wrote:
(03-28-2020, 04:42 PM)TookaFace Wrote: Try with this:

Code:
sudo pip3 install gmusicapi

Just beat me to it.

@Lttlwing16
The 'pip' command is the package manager for Python 2. If you want to install Python 3 packages use 'pip3'
That said installing the Python3 package of gmusicapi with "sudo pip3 install gmusicapi" did nothing to the upnp config screen on my Moode.

So Iogging in to the Pi via SSH and editing /var/www/upp-config.php (e.g. "sudo nano /var/www/npp-config.php") to change line 75 from;

   
Code:
$result = sysCmd('/var/www/command/util.sh check-dir "/usr/local/lib/python2.7/dist-packages/gmusicapi"');

to...
   
Code:
$result = sysCmd('/var/www/command/util.sh check-dir "/usr/local/lib/python3.7/dist-packages/gmusicapi"');

... did the trick. The UPnP config screen now shows the Google Music credentials fields.

I don't have a Google Music subscription to test but hope that works for you.
Maybe that and the advice shown in the UPnP config screen could be updated for the next release if it works.

(03-28-2020, 05:55 PM)TheOldPresbyope Wrote:
(03-28-2020, 03:55 PM)Lttlwing16 Wrote: So currently, there is no easy way to build the gmusicapi for Moode? I attempted installing older versions, but they all failed, all relying on Python 3.5 or higher.

If I get a chance I'll look at this tonight. It can't be too hard to sort out; just need to be sure of the details.

I gave up my Google Music subscription so can only test that gmusicapi compiles.

NVM - I didn't notice TookaFace and vinnn took care of it.

Thanks both of you. I got it up and running! Easy fix! Got to say I love the support of this player!

EDIT: I spoke too soon. Won't login after entering my credentials. I'm a 2FA guy and have created an app password, but still no go. : (
Reply
#25
Seems to be a thing with gmusicapi and 2fa authentication. There's an open issue on the project's GitHub that has been unresolved for ages.

All I can suggest is take that up with the gmusicapi project, or use BubbleUPnP to render and send your Google Music to moOde, use Bluetooth (sound quality isn't great on Google Music anyway) or take an opportunity to try out Tidal and use that with BubbleUPnP. There's plenty of options.
Reply
#26
(03-29-2020, 12:47 PM)vinnn Wrote: Seems to be a thing with gmusicapi and 2fa authentication. There's an open issue on the project's GitHub that has been unresolved for ages.

All I can suggest is take that up with the gmusicapi project, or use BubbleUPnP to render and send your Google Music to moOde, use Bluetooth (sound quality isn't great on Google Music anyway) or take an opportunity to try out Tidal and use that with BubbleUPnP. There's plenty of options.

I'm pretty determined. I started following the usage guide on https://unofficial-google-music-api.read...stallation to setup the api. However, I'm hitting an error at the login as python, for some reason can't find the directory that contains the token, even though I can find it and read it myself within ~/.local.share/gmusicapi/mobileclient.cred

Will keep trying to setup it up manually, and figuring out why python can't see the file. 

I wonder if Tim could chime in and let me know how he implemented gmusicapi within moode, as there can be a Mobileclient, or Webclient. I'm also not sure if manual login is necessary if he has implemented the steps from within the gui. 

Thanks,

David

EDIT: I bet moode is using the upmpdcli-gmusic plugin. Looks like it may not be properly maintained anymore.
Reply
#27
Correct. moOde uses the upmpdcli implementation for gmusic. I'm not sure how it works.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#28
From the file doc/upmpdcli-manual.txt in the (recently relocated) upmpdcli repo

Quote:I'm a little lost in the different google authentication/sign-in methods,
but anyway:

- If you are using two way authentication, you will need to
link:https://www.lesbonscomptes.com/upmpdcli/github-issues/upmpdcli-html/issue-87.html[create
and use an app password].
- The interface needs an actual Android Device Id from a registered device
  to fetch audio streams (but not to browse). The software will try to get
  one from the list of registered devices, but if this does not work, you
  may have to set it explicitely in the configuration.

Oddly, that page still exists even though the repo itself is elsewhere now.

Regards.
Kent
Reply
#29
(03-29-2020, 11:02 PM)TheOldPresbyope Wrote: From the file doc/upmpdcli-manual.txt in the (recently relocated) upmpdcli repo

Quote:I'm a little lost in the different google authentication/sign-in methods,
but anyway:

- If you are using two way authentication, you will need to
link:https://www.lesbonscomptes.com/upmpdcli/github-issues/upmpdcli-html/issue-87.html[create
and use an app password].
- The interface needs an actual Android Device Id from a registered device
  to fetch audio streams (but not to browse). The software will try to get
  one from the list of registered devices, but if this does not work, you
  may have to set it explicitely in the configuration.

Oddly, that page still exists even though the repo itself is elsewhere now.

Regards.
Kent

It appears it's using the deprecated api.login(), which is most likely why it fails from the GUI. The api.oauth_login() is now necessary, from what reading I've done. 

What is strange is I've gone through the setup in Python but get stuck at the device_id part of the oauth_login. It just tells me I have an invalid id, even if I enter one from the list of "valid id's" it returns itself.
Reply
#30
@Lttlwing16


The upmpdcli and gmusicapi code is open-source. You can post a pull request to JFDockes (Mr. Upmpdcli) to upgrade his code to use api.oauth_login() and include the extra credentials in upmpdcli.conf. Once this is committed, Tim can modify the moOde UPnP Config page and database to include those credentials too. 

Keep in mind Google has been saying for over a year that "we eventually plan to replace Google Play Music with YouTube Music." Granted, "eventually" is proving to be an elastic concept.

Like I said, I no longer use Google Play Music so I can't help test any variant of gmusicapi. I recall that when I did use it, I had trouble with device ids even with single-factor authentication.

Good luck.

Regards,
Kent
Reply


Forum Jump: