• Stars
    star
    930
  • Rank 49,124 (Top 1.0 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created about 11 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mopidy extension for playing music from Spotify

Mopidy-Spotify

Latest PyPI version CI build status Test coverage

Mopidy extension for playing music from Spotify.

Status ⚠️

Mopidy-Spotify currently has no support for the following:

  • Seeking
  • Gapless playback
  • Volume normalization
  • 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

Maintainer wanted

Mopidy-Spotify is currently kept on life support by the Mopidy core developers. It is in need of a more dedicated maintainer.

If you want to be the maintainer of Mopidy-Spotify, please:

  1. Make 2-3 good pull requests improving any part of the project.

  2. Read and get familiar with all of the project's open issues.

  3. Send a pull request removing this section and adding yourself as the "Current maintainer" in the "Credits" section below. In the pull request description, please refer to the previous pull requests and state that you've familiarized yourself with the open issues.

    As a maintainer, you'll be given push access to the repo and the authority to make releases to PyPI when you see fit.

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.
  • gst-plugins-spotify >= 0.10. The GStreamer Rust Plugin to stream Spotify audio, based on librespot. This plugin is not yet available from apt.mopidy.com and must be built from source (see below).
  • Mopidy >= 3.4. The music server that Mopidy-Spotify extends.

Example build instructions for gst-plugins-spotify:

  1. Install Rust:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  2. Install the GStreamer Rust bindings dependencies:

    sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gcc pkg-config git
    
  3. Download, build and install gst-plugins-spotify from source:

    git clone --depth 1 https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs
    cd gst-plugins-rs
    cargo build --package gst-plugin-spotify --release
    sudo install -m 644 target/release/libgstspotify.so $(pkg-config --variable=pluginsdir gstreamer-1.0)/
    
  4. Verify the spotify plugin is available:

    gst-inspect-1.0 spotify
    

Installation

Install by running:

sudo python3 -m pip install https://github.com/mopidy/mopidy-spotify/archive/master.zip

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/cache_size: Maximum cache size in MiB. Set to 0 for unlimited. Defaults to 8192.
  • 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.

Project resources

Credits

More Repositories

1

mopidy

Mopidy is an extensible music server written in Python
Python
7,999
star
2

mopidy-gmusic

DEPRECATED (Mopidy extension for playing music from Google Play Music)
Python
214
star
3

mopidy-soundcloud

Mopidy extension for playing music from SoundCloud
Python
183
star
4

mopidy-mpd

Mopidy extension for controlling playback from MPD clients
Python
98
star
5

mopidy.js

JavaScript library for controlling a Mopidy music server over a WebSocket from browsers or Node.js. This is the foundation of Mopidy web clients.
JavaScript
75
star
6

libspotify-archive

Archive of the latest libspotify releases from Spotify
69
star
7

mopidy-scrobbler

Mopidy extension for scrobbling played tracks to Last.fm
Python
66
star
8

mopidy-local

Mopidy extension for playing music from your local music archive
Python
61
star
9

mopidy-beets

Mopidy extension for playing music from a Beets collection
Python
49
star
10

mopidy-alsamixer

Mopidy extension for ALSA volume control
Python
42
star
11

mopidy-mpris

Mopidy extension for controlling Mopidy through the MPRIS D-Bus interface
Python
35
star
12

libspotify-deb

Debian package of libspotify
HTML
30
star
13

mopidy-local-sqlite

DEPRECATED (Mopidy SQLite local library extension)
Python
30
star
14

mopidy-pandora

A Mopidy extension for playing music from Pandora.
Python
27
star
15

homebrew-mopidy

Homebrew formulas for Mopidy and Mopidy extensions
Ruby
22
star
16

mopidy-api-explorer

Mopidy extension which lets you explore the JSON-RPC API.
HTML
20
star
17

cookiecutter-mopidy-ext

cookiecutter template for creating a Mopidy extension
Python
18
star
18

website

The Mopidy project's website, excluding docs
Sass
12
star
19

mopidy-dirble

DEPRECATED (Mopidy extension for Dirble open radio directory)
Python
11
star
20

mopidy-local-images

DEPRECATED (Mopidy local library proxy extension for handling embedded album art)
Python
9
star
21

mopidy-orfradio

Mopidy extension to access the Austrian ORF radio stations' livestreams and 7 day archives
Python
5
star
22

mopidy-nad

Mopidy extension for controlling volume using an external NAD amplifier
Python
4
star
23

mopidy-packages

DEPRECATED (Tools for tracking projects in the Mopidy ecosystem)
Python
4
star
24

libmockspotify

DEPRECATED (A mock of libspotify for use in development of language bindings)
C
3
star
25

mopidy-local-whoosh

DEPRECATED (Whoosh local library extension for Mopidy)
Python
2
star
26

apt

The Mopidy APT repository of Debian/Ubuntu packages.
HTML
1
star
27

infrastructure

Mopidy project infrastructure as code
Dockerfile
1
star