Spotify

A Spotify Premium account is required to stream audio from Spotify. Tizonia will not work with a Spotify Free account. Please introduce your Premium account’s user name and password into tizonia.conf, or alternatively, use the corresponding command-line options available.

CONFIGURATION

The Tizonia configuration file contains a block under the [tizonia] section like the one pictured below (see also Configuration File).

Warning

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 credentials.

E.g.: $ chmod og-rwx $HOME/.config/tizonia/tizonia.conf

# Spotify configuration
# -------------------------------------------------------------------------
# To avoid passing this information on the command line, uncomment
# and configure accordingly
#
# spotify.user     = user
# spotify.password = pass
# spotify.recover_lost_token = false (set to true to continue playback after
#                                     the token has been [spuriously?] lost)
# spotify.allow_explicit_tracks = false (set to true to allow explicit tracks)
# spotify.preferred_bitrate = Three possible values: 96, 160, or 320 ; default: 320
spotify.user

The username of the Spotify Premium account. For older accounts, the username may be related to account email address (i.e. same as the email address without the @domain). For newer accounts, the username is a random string of around 25 characters allocated by Spotify.

Note

If you created your account through Facebook you will need to create a “device password” to stream from Spotify using Tizonia. Note that the device password option is only available for Facebook-created accounts. Please read the Spotify documentation at http://www.spotify.com/account/set-device-password/.

spotify.password

Password of the Premium account. Please do not allow ‘#’ in the password. There is a bug in Tizonia that prevents this character in the password field.

spotify.recover_lost_token

Set to true to allow Tizonia to resume playback and recover the token automatically when the playback token is lost. This can occur if for example, another device starts streaming using your account (e.g. listening to Spotify on an Echo device while Tizonia is already streaming on your computer). Optional (Default: false).

spotify.allow_explicit_tracks

Set to true to allow explicit tracks in Tizonia’s play queue. Otherwise, explicit tracks are removed from the queue before playback. Optional (Default: false).

spotify.preferred_bitrate

Select the preferred bitrate while streaming from Spotify. Three possible values: 96, 160, or 320. Optional (Default: 320).

OPTIONS

--spotify-user arg

Spotify user name (not required if provided via config file).

--spotify-password arg

Spotify user password (not required if provided via config file).

--spotify-owner arg

The owner of the playlist (this is optional: use in conjunction with –spotify-playlist or –spotify-playlist-id).

--spotify-recover-lost-token

Allow Tizonia to recover the play token and keep playing after a spurious token loss (default: false).

--spotify-allow-explicit-tracks

Allow Tizonia to play explicit tracks from Spotify (default: false).

--spotify-preferred-bitrate arg

Preferred Spotify bitrate (kbps) (320, 160 or 96; default: 320).

--spotify-tracks arg

Search and play from Spotify by track name.

--spotify-artist arg

Search and play from Spotify by artist name.

--spotify-album arg

Search and play from Spotify by album name.

--spotify-playlist arg

Search and play public playlists (owner is assumed the current user, unless –spotify-owner is provided).

--spotify-track-id arg

Play from Spotify by track ID, URI or URL.

--spotify-artist-id arg

Play from Spotify by artist ID, URI or URL.

--spotify-album-id arg

Play from Spotify by album ID, URI or URL.

--spotify-playlist-id arg

Play public playlists from Spotify by ID, URI or URL (owner is assumed the current user, unless –spotify-owner is provided).

--spotify-related-artists arg

Search and play from Spotify the top songs from a selection of related artists.

--spotify-featured-playlist arg

Search and play a featured playlist from Spotify.

--spotify-new-releases arg

Search and play a newly released album from Spotify.

--spotify-recommendations-by-track-id arg

Play Spotify recommendations by track ID, URI or URL

--spotify-recommendations-by-artist-id arg

Play Spotify recommendations by artist ID, URI or URL.

--spotify-recommendations-by-genre arg

Play Spotify recommendations by genre name.

EXAMPLES

$ tizonia --spotify-artist 'enya'

$ tizonia --spotify-album 'the greatest showman'

$ tizonia --spotify-recommendations-by-track-id 3MrRksHupTVEQ7YbA0FsZK

$ tizonia --spotify-playlist 'best metal 2000s' --spotify-owner 'anyuser'