Skip to content
Mopidy extension for playing music from Google Play Music
Python
Branch: master
Clone or download

Latest commit

jjok Don't use inconsistent `albumId` or `artistId` (#233)
* Don't use `albumId` or `artistId` from Google, as it doesn't always exist

* Remove commented code

* Add pipe to separate sections of album ID

* Add logging for library refresh

* Hopefully fix indentations

* Ran `black .`
4
Latest commit a4a7846 Mar 10, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update project to match cookiecutter-mopidy-ext Nov 25, 2019
mopidy_gmusic Don't use inconsistent `albumId` or `artistId` (#233) Mar 10, 2020
tests Fix Thread.isAlive() deprecation warnings Dec 10, 2019
.gitignore Update project to match cookiecutter-mopidy-ext Nov 25, 2019
.mailmap Update .mailmap Nov 25, 2019
CHANGELOG.rst Release v4.0.0 Dec 22, 2019
LICENSE initial commit Jul 4, 2013
MANIFEST.in Update project to match cookiecutter-mopidy-ext Nov 25, 2019
README.rst docs: Update installation instructions Dec 22, 2019
pyproject.toml Update project to match cookiecutter-mopidy-ext Nov 25, 2019
setup.cfg Release v4.0.0 Dec 22, 2019
setup.py Update project to match cookiecutter-mopidy-ext Nov 25, 2019
tox.ini Update project to match cookiecutter-mopidy-ext Nov 25, 2019

README.rst

Mopidy-GMusic

Latest PyPI version CircleCI build status Test coverage

Mopidy extension for playing music from Google Play Music.

Co-maintainer wanted

We are currently looking for a co-maintainer. Preferably someone who is familiar with the codebase, familiar with Python development, and uses the uploaded music feature. If you're interested, please take a look at the code base and work on submitting a pull request or two to show you understand how everything works together. If you need help getting a development environment set up, don't hesitate to ping "belak" in the #mopidy channel on the Freenode IRC network.

Dependencies

You must have a Google account, and either:

  • have some music uploaded to your Google Play Music library, or
  • have a paid subscription for Google Play Music.

Installation

Install by running:

sudo python3 -m pip install Mopidy-GMusic

See https://mopidy.com/ext/gmusic/ for alternative installation methods

Configuration

Run mopidy gmusic login to obtain a refresh token, and then include it in your config file:

[gmusic]
refresh_token = <your refresh token>

Google Play Music now requires all clients to provide a device ID. In the past, Mopidy-GMusic generated one automatically from your MAC address, but Google seems to have changed their API in a way that prevents this from working. Therefore you will need to configure one manually.

If no device ID is configured, Mopidy-GMusic will output a list of registered devices and their IDs. You can either use one of those IDs in your config file, or use the special value mac if you want gmusicapi to use the old method of generating an ID from your MAC address:

[gmusic]
deviceid = 0123456789abcdef
# or
deviceid = mac

By default, All Access will be enabled automatically if you subscribe. You may force enable or disable it by using the all_access option:

[gmusic]
all_access = true

By default, the bitrate is set to 160 kbps. You can change this to either 128 or 320 kbps by setting:

[gmusic]
bitrate = 320

All Access radios are available as browsable content or playlist. The following are the default config values:

[gmusic]
# Show radio stations in content browser
radio_stations_in_browse = true
# Show radio stations as playlists
radio_stations_as_playlists = false
# Limit the number of radio stations, unlimited if unset
radio_stations_count =
# Limit the number or tracks for each radio station
radio_tracks_count = 25

The library and playlists are automatically refresh at regular intervals. Refreshing can be CPU intensive on very low-powered machines, e.g. Raspberry Pi Zero. The refresh intervals can be configured:

[gmusic]
# How often to refresh the library, in minutes
refresh_library = 1440
# How often to refresh playlists, in minutes
refresh_playlists = 60

Usage

The extension is enabled by default if all dependencies are available. You can simply browse through your library and search for tracks, albums, and artists. Google Play Music playlists are imported as well. You can even add songs from your All Access subscription to your library. Mopidy will able to play them.

Project resources

Credits

You can’t perform that action at this time.