Skip to main content

Synchronize Spotify Playlist to MPD

Project description

Usage

Please note that this won't work without Spotify Premium because Spotify limits web API access to non-free accounts.

This also requires you to have set up mopidy-spotify in order to play spotify tracks.

  • Install from PyPI with pip3 install --user spotify-mpd-sync

  • Go to https://developer.spotify.com/dashboard/applications and create an application. Call it whatever you want.

  • Go to "Edit Settings" in your newly created app, then add http://localhost:8080 as a redirect URI and hit "Save" (You may choose a different one by setting SPOTIPY_REDIRECT_URI in your environment if localhost:8080 is unavailable)

  • Find your spotify username here

  • You will have to set up some environment variables in order to run the app.

export SPOTIFY_USERNAME="The username you got above"
export SPOTIPY_CLIENT_ID="Your app's client ID"
export SPOTIPY_CLIENT_SECRET="Your app's client secret"
export SPOTIPY_REDIRECT_URI="http://localhost:8080"
  • Now you can run spotsync -H my_mpd_host -P 6600 where my_mpd_host is the host you are running MPD on (host defaults to localhost and port defaults to 6600 if you do not include it)

  • If this is the first time you are running it, it will direct you to a page in your browser to grant permission for the app you just created to access your private spotify playlist. You only need to do this once, and then your credentials will be cached.

  • You will be prompted to grant permission to the app, once that's done, it will cache the credentials locally and you should be able to just run spotsync.

Project details


Download files

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

Files for spotify-mpd-sync, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size spotify_mpd_sync-1.0.2-py3-none-any.whl (6.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size spotify-mpd-sync-1.0.2.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page