Mopidy extension for playing music from Spotify.
- A Spotify Premium subscription. Mopidy-Spotify will not work with Spotify Free or Spotify Unlimited, 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.
libspotify>= 12, < 13. The official C library from the Spotify developer site. The package is available aslibspotify12from apt.mopidy.com.pyspotify>= 1.9, < 2. Thelibspotifypython wrapper. The package is available aspython-spotifyfrom apt.mopidy.com orpyspotifyon PyPI.Mopidy>= 0.16. The music server that Mopidy-Spotify extends.
If you install Mopidy-Spotify from apt.mopidy.com, these dependencies are installed automatically.
Install by running:
pip install Mopidy-Spotify
Or, if available, install the Debian/Ubuntu package from apt.mopidy.com.
Before starting Mopidy, you must add your Spotify Premium username and password to your Mopidy configuration file:
[spotify] username = alice password = secret
The following configuration values are available:
spotify/enabled: If the Spotify extension should be enabled or not.spotify/username: Your Spotify Premium username.spotify/password: Your Spotify Premium password.spotify/bitrate: Audio bitrate in kbps. 96, 160 or 320. Defaults to 160.spotify/timeout: Seconds before giving up waiting for search results, etc. Defaults to 10 seconds.spotify/cache_dir: The dir where the Spotify extension caches data. Defaults to$XDG_CACHE_DIR/mopidy/spotify, which usually means~/.cache/mopidy/spotify. If set to an empty string, caching is disabled.spotify/settings_dir: The dir where the Spotify extension stores libspotify settings. Defaults to$XDG_CONFIG_DIR/mopidy/spotify, which usually means~/.config/mopidy/spotify.
- Change
library.lookup()to return tracks even if they are unplayable. There's no harm in letting them be added to the tracklist, as Mopidy will simply skip to the next track when failing to play the track. (Fixes: mopidy/mopidy#606)
- Change search field
tracktotrack_namefor compatibility with Mopidy 0.17. (Fixes: mopidy/mopidy#610)
- Add
spotify/settings_dirconfig value so that libspotify settings can be stored to another location than the libspotify cache. This also allowsspotify/cache_dirto be unset, since settings are now using it's own config value. - Make the
spotify/cache_dirconfig value optional, so that it can be set to an empty string to disable caching.
- Support searches from Mopidy that are using the
albumartistfield type, added in Mopidy 0.16. - Ignore the
track_nofield in search queries, added in Mopidy 0.16. - Abort Spotify searches immediately if the search query is empty instead of waiting for the 10s timeout before returning an empty search result.
- Moved extension out of the main Mopidy project.