Google Play Music¶
Music streaming from the Google Play Music service is supported on both free and paid tiers. In both cases, credentials are required to be input via command-line or configuration file.
The Tizonia configuration file contains a block under the
like the one pictured below (see also Configuration File).
When user names and passwords are stored in your local
tizonia.conf, please ensure that this file has the correct
file system permissions to prevent other users from accessing your
$ chmod og-rwx $HOME/.config/tizonia/tizonia.conf
# Google Play Music configuration # ------------------------------------------------------------------------- # To avoid passing this information on the command line, uncomment and # configure here. # # gmusic.user = email@example.com # gmusic.password = pass (account password or app-specific password for # 2-factor users) # gmusic.device_id = deviceid (16 hex digits, e.g. '1234567890abcdef') # gmusic.buffer_seconds = size of the audio buffer (in seconds) to use while # downloading streams. Default: 720. Increase in # case of cuts.
The Google Play Music account username, e.g. ‘firstname.lastname@example.org’ or just ‘user’.
Account password or app-specific password for 2-factor users.
Note that there are two options to allow Tizonia access to a Google Play Music account:
The “Less secure app access” setting is enabled on the Google account: - See https://myaccount.google.com/lesssecureapps
An app-specific password is used with Tizonia if 2-factor authentication is enabled on the account: - See https://support.google.com/accounts/answer/185833
Note that Tizonia caches the authentication token received from Google Play Music on the first successful access to the service (i.e. with a valid username and password) and uses this token to re-authenticate in subsequent attempts to access the service. When the token expires, Tizonia accesses the service with username and password once more to retrieve a new token.
An Android device id associated to your account. This is usually a 16-digit hexadecimal number, e.g. ‘1234567890abcdef’. There are step-by-step tutorials on the Internet that may help with finding the device id on Android or iOS devices. There are also some apps in the Google Play store that may help with that, e.g. Device ID. If you are a Google Play Music subscriber, you may also try to input a random device id. When using a random device id with a subscriber account, the software will return a list of real device ids associated to the account.
This is the minimum size of the audio buffer (in seconds) that Tizonia will use while downloading the audio streams. It may be increased in case of cuts, but usually not required. Default: 720.
Command-line options that contain
unlimited represent those
that require a ‘Premium’ subscription to operate.
Google Play Music user name (not required if provided via config file).
Google Play Music user’s password (not required if provided via config file).
Google Play Music device id (not required if provided via config file).
Additional search keywords (this is optional: use in conjunction with–gmusic-unlimited-activity).
Play all tracks from the user’s library.
Play tracks from the user’s library by track name.
Play tracks from the user’s library by artist.
Play an album from the user’s library.
A playlist from the user’s library.
Search and play Google Play Music podcasts (only available in the US and Canada).
Search and play Google Play Music free stations.
Search and play Google Play Music Unlimited stations found in the user’s library.
Search and play Google Play Music Unlimited tracks by album (best match only).
Search and play Google Play Music Unlimited tracks by artist (best match only).
Search and play Google Play Music Unlimited tracks by name (50 first matches only).
Search and play Google Play Music Unlimited playlists by name.
Search and play Google Play Music Unlimited tracks by genre.
Search and play Google Play Music Unlimited tracks by activity.
Play the user’s Google Play Music Unlimited ‘I’m Feeling Lucky’ station.
Play Google Play Music Unlimited promoted tracks.
$ tizonia --gmusic-unlimited-album 'the division bell' $ tizonia --gmusic-unlimited-feeling-lucky-station $ tizonia --gmusic-unlimited-genre "alt metal" $ tizonia --gmusic-unlimited-playlist 'new metal' $ tizonia --gmusic-unlimited-promoted-tracks $ tizonia --gmusic-unlimited-station "top christmas songs" $ tizonia --gmusic-unlimited-tracks 'gun word up' $ tizonia --gmusic-unlimited-activity "working out" --gmusic-additional-keywords 'chart' $ tizonia --gmusic-unlimited-activity "working out" --gmusic-additional-keywords 'chart'