Skip to main content
Latest PyPI version CircleCI build status Test coverage

Mopidy extension for playing music from Spotify.

Status

Mopidy-Spotify is dependent on pyspotify, a wrapper for Spotify’s libspotify C library. libspotify was deprecated in 2015 with no replacement. It is unmaintained, functionally limited, and also now unavailable from the Spotify developer site. Where possible we are moving to use Spotify’s Web API instead. However, native playback is still only possible using libspotify and there is no official way for us to provide some Spotify features.

Limitations and/or bugs in libspotify currently result in missing/broken Mopidy-Spotify support for the following:

  • Saving items to My Music (#108) - possible via web API

  • Podcasts (#201) - unavailable

  • Radio (#9) - unavailable

  • Spotify Connect (#14) - unavailable

Working support for the following features is currently available:

  • Playback

  • Search

  • Playlists (read-only)

  • Top lists and Your Music (read-only)

  • Lookup by URI

Dependencies

  • A Spotify Premium subscription. Mopidy-Spotify will not work with Spotify Free, just Spotify Premium.

  • A non-Facebook Spotify username and password. If you created your account through Facebook you’ll need to create a “device password” to be able to use Mopidy-Spotify. Go to http://www.spotify.com/account/set-device-password/, login with your Facebook account, and follow the instructions. However, sometimes that process can fail for users with Facebook logins, in which case you can create an app-specific password on Facebook by going to facebook.com > Settings > Security > App passwords > Generate app passwords, and generate one to use with Mopidy-Spotify.

  • libspotify 12. The official C library from our Unofficial libspotify archive. The package is available as libspotify12 from apt.mopidy.com.

  • pyspotify >= 2.0.5. The libspotify Python wrapper. The package is available as python3-spotify from apt.mopidy.com or pyspotify on PyPI. See https://pyspotify.readthedocs.io/en/latest/installation/ for how to install it and its dependencies on most platforms.

  • Mopidy >= 3.0. The music server that Mopidy-Spotify extends.

If you install Mopidy-Spotify from apt.mopidy.com, AUR, or Homebrew, these dependencies are installed automatically.

Installation

Install by running:

sudo python3 -m pip install Mopidy-Spotify

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

Configuration

Before starting Mopidy, you must add your Spotify Premium username and password to your Mopidy configuration file and also visit https://mopidy.com/ext/spotify/#authentication to authorize this extension against your Spotify account:

[spotify]
username = alice
password = secret
client_id = ... client_id value you got from mopidy.com ...
client_secret = ... client_secret value you got from mopidy.com ...

The following configuration values are available:

  • spotify/enabled: If the Spotify extension should be enabled or not. Defaults to true.

  • spotify/username: Your Spotify Premium username. You must provide this.

  • spotify/password: Your Spotify Premium password. You must provide this.

  • spotify/client_id: Your Spotify application client id. You must provide this.

  • spotify/client_secret: Your Spotify application secret key. You must provide this.

  • spotify/bitrate: Audio bitrate in kbps. 96, 160, or 320. Defaults to 160.

  • spotify/volume_normalization: Whether volume normalization is active or not. Defaults to true.

  • spotify/timeout: Seconds before giving up waiting for search results, etc. Defaults to 10.

  • spotify/allow_cache: Whether to allow caching. The cache is stored in a “spotify” directory within Mopidy’s core/cache_dir. Defaults to true.

  • spotify/allow_network: Whether to allow network access or not. Defaults to true.

  • spotify/allow_playlists: Whether or not playlists should be exposed. Defaults to true.

  • spotify/search_album_count: Maximum number of albums returned in search results. Number between 0 and 50. Defaults to 20.

  • spotify/search_artist_count: Maximum number of artists returned in search results. Number between 0 and 50. Defaults to 10.

  • spotify/search_track_count: Maximum number of tracks returned in search results. Number between 0 and 50. Defaults to 50.

  • spotify/toplist_countries: Comma separated list of two letter ISO country codes to get toplists for. Defaults to blank, which is interpreted as all countries that Spotify is available in.

  • spotify/private_session: Whether to use a private Spotify session. Turn on private session to disable sharing of played tracks with friends through the Spotify activity feed, Last.fm scrobbling, and Facebook. This only affects social sharing done by Spotify, not by other Mopidy extensions. Defaults to false.

Project resources

Credits

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Mopidy-Spotify-4.1.0.tar.gz (48.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Mopidy_Spotify-4.1.0-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file Mopidy-Spotify-4.1.0.tar.gz.

File metadata

  • Download URL: Mopidy-Spotify-4.1.0.tar.gz
  • Upload date:
  • Size: 48.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for Mopidy-Spotify-4.1.0.tar.gz
Algorithm Hash digest
SHA256 9a41fc970a9b66be0c757f3817f013a7af00e4b0ef795c90343003fd86a5126f
MD5 36566e7f64b942c0ce90ae4782b89c3b
BLAKE2b-256 2834b813121d65d8fbe30062380d7ff258f5d6b13030cd7fc0d64c33a9851ea5

See more details on using hashes here.

File details

Details for the file Mopidy_Spotify-4.1.0-py3-none-any.whl.

File metadata

  • Download URL: Mopidy_Spotify-4.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for Mopidy_Spotify-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3de27eeea9c963726d5eb1667eee99bcac53a48fe0407363ce8a480176e9367
MD5 3026ccbd8b7b907c9cbdefa0c913935d
BLAKE2b-256 d253984a1842ac83471aad5eebf2cc73dbd519d9c53b418756fa7183cec22018

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page