christopher-dG / gpymusic

Google Py Music: A simple TUI client for Google Play Music
MIT License
200 stars 13 forks source link

Which Device ID do I use? #47

Closed kroppt closed 6 years ago

kroppt commented 6 years ago

I know it has something to do with Google, but I am unsure which Device ID to input into my config.

I tried running gpymusic anyway, and the resulting errors were pretty malformed insofar as the spacing is messed up after newlines:

Logging in...Traceback (most recent call last):
                                                 File "/home/tyler/.local/bin/gpymusic", line 17, in <module>
                                                                                                                 start.login(config['user'])
                                                                                                                                              File "/home/tyler/.local/lib64/python3.5/site-packages/gpymusic/start.py", line 254, in login
                            if not common.mc.login(user['email'], user['password'], user['deviceid']):
                                                                                                        File "/home/tyler/.local/lib64/python3.5/site-packages/gmusicapi/clients/mobileclient.py", line 143, in login
      self.android_id = self._validate_device_id(device_id, is_mac=is_mac)
                                                                            File "/home/tyler/.local/lib64/python3.5/site-packages/gmusicapi/clients/mobileclient.py", line 58, in _validate_device_id
                                                                                                                                                                                                          raise InvalidDeviceId('Invalid device_id %s.' % device_id, devices)
                                                          gmusicapi.exceptions.InvalidDeviceId: Invalid device_id .Your valid device IDs are:
                            <list of device IDs>

Anyway, so I am not sure which ID to choose. There are 8 available to choose from. Some have capitalized letters, others have lowercase letters, some are 12 characters long, and some are 60 characters long. No further information is given in the list.

christopher-dG commented 6 years ago

I think you'll want one of the shorter ones. To test it out without the spacing issues upon error, you can try this from an interpreter:

import gmusicapi
mc = gmusicapi.Mobileclient()
mc.login("email", "password", "deviceid")
kroppt commented 6 years ago

Logging in with several actually returns true for each one... What is this Device ID supposed to represent exactly?

christopher-dG commented 6 years ago

They're associated with physical devices that you've logged into your Google account on. Any that returns true should work.

kroppt commented 6 years ago

I see now. I found the one that matches my MAC address. Thanks.