<commit_before>*************
Mopidy-GMusic
*************

.. image:: https://pypip.in/v/Mopidy-GMusic/badge.png
    :target: https://pypi.python.org/pypi/Mopidy-GMusic/
    :alt: Latest PyPI version

.. image:: https://pypip.in/d/Mopidy-GMusic/badge.png
    :target: https://pypi.python.org/pypi/Mopidy-GMusic/
    :alt: Number of PyPI downloads

.. image:: https://travis-ci.org/hechtus/mopidy-gmusic.png?branch=develop
    :target: https://travis-ci.org/hechtus/mopidy-gmusic
    :alt: Travis CI build status

.. image:: https://coveralls.io/repos/hechtus/mopidy-gmusic/badge.png?branch=develop
   :target: https://coveralls.io/r/hechtus/mopidy-gmusic?branch=develop
   :alt: Test coverage

`Mopidy <http://www.mopidy.com/>`_ extension for playing music from
`Google Play Music <https://play.google.com/music/>`_.


Dependencies
============

- You must have a Google account and some music and playlists in your
  library.

- You must have an Android device registered for Google Play Music.

- The `Unofficial Google Music API
  <https://github.com/simon-weber/Unofficial-Google-Music-API>`_ is
  needed to access Google Play Music. It will automatically be installed
  together with Mopidy-GMusic.


Installation
============

Install the Mopidy-GMusic extension by running::

    pip install mopidy-gmusic

Configuration
=============

Before starting Mopidy, you must add your Google username, password,
and Android mobile device ID to your Mopidy configuration file::

    [gmusic]
    username = alice
    password = <PASSWORD>
    deviceid = 0123456789abcdef

The mobile device ID is a 16-digit hexadecimal string (without a '0x'
prefix) identifying the Android device registered for Google Play
Music. You can obtain this ID by dialing ``*#*#8255#*#*`` on your
phone (see the aid) or using this `App
<https://play.google.com/store/apps/details?id=com.evozi.deviceid>`_
(see the Google Service Framework ID Key). You may also leave this
field empty. Mopidy will try to find the ID by itself. See the Mopidy
logs for more information.

All Access subscribers may enable All Access integration by adding this line::

    [gmusic]
    all_access = true

All Access radios are available as browsable content or playlist::

    [gmusic]
    # show radio stations in content browser
    show_radio_stations_browse = true
    # show radio stations as playlists
    show_radio_stations_playlist = false
    # limit the number of radio stations, 0 = unlimited
    max_radio_stations = 0
    # limit the number or tracks for each radio station
    max_radio_tracks = 25

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<commit_msg>docs: Update badges<commit_after>*************
Mopidy-GMusic
*************

.. image:: https://img.shields.io/pypi/v/Mopidy-GMusic.svg?style=flat
    :target: https://pypi.python.org/pypi/Mopidy-GMusic/
    :alt: Latest PyPI version

.. image:: https://img.shields.io/pypi/dm/Mopidy-GMusic.svg?style=flat
    :target: https://pypi.python.org/pypi/Mopidy-GMusic/
    :alt: Number of PyPI downloads

.. image:: https://img.shields.io/travis/hechtus/mopidy-gmusic/develop.svg?style=flat
    :target: https://travis-ci.org/hechtus/mopidy-gmusic
    :alt: Travis CI build status

.. image:: https://img.shields.io/coveralls/hechtus/mopidy-gmusic/develop.svg?style=flat
   :target: https://coveralls.io/r/hechtus/mopidy-gmusic?branch=develop
   :alt: Test coverage

`Mopidy <http://www.mopidy.com/>`_ extension for playing music from
`Google Play Music <https://play.google.com/music/>`_.


Dependencies
============

- You must have a Google account and some music and playlists in your
  library.

- You must have an Android device registered for Google Play Music.

- The `Unofficial Google Music API
  <https://github.com/simon-weber/Unofficial-Google-Music-API>`_ is
  needed to access Google Play Music. It will automatically be installed
  together with Mopidy-GMusic.


Installation
============

Install the Mopidy-GMusic extension by running::

    pip install mopidy-gmusic


Configuration
=============

Before starting Mopidy, you must add your Google username, password,
and Android mobile device ID to your Mopidy configuration file::

    [gmusic]
    username = alice
    password = <PASSWORD>
    deviceid = 0123456789abcdef

The mobile device ID is a 16-digit hexadecimal string (without a '0x'
prefix) identifying the Android device registered for Google Play
Music. You can obtain this ID by dialing ``*#*#8255#*#*`` on your
phone (see the aid) or using this `App
<https://play.google.com/store/apps/details?id=com.evozi.deviceid>`_
(see the Google Service Framework ID Key). You may also leave this
field empty. Mopidy will try to find the ID by itself. See the Mopidy
logs for more information.

All Access subscribers may enable All Access integration by adding this line::

    [gmusic]
    all_access = true

All Access radios are available as browsable content or playlist::

    [gmusic]
    # show radio stations in content browser
    show_radio_stations_browse = true
    # show radio stations as playlists
    show_radio_stations_playlist = false
    # limit the number of radio stations, 0 = unlimited
    max_radio_stations = 0
    # limit the number or tracks for each radio station
    max_radio_tracks = 25


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
{'fraction_non_alphanumeric': 0.11018600531443755, 'fraction_numerical': 0.007440212577502214, 'mean_word_length': 3.9439579684763575, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 22, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5744711', 'n_tokens_mistral': 1813, 'n_tokens_neox': 1701, 'n_words': 593}