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.

Source Distribution

spotify-mpd-sync-1.0.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

spotify_mpd_sync-1.0.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file spotify-mpd-sync-1.0.2.tar.gz.

File metadata

  • Download URL: spotify-mpd-sync-1.0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for spotify-mpd-sync-1.0.2.tar.gz
Algorithm Hash digest
SHA256 82c427a60225fd6e93e52c3f0f4f2121f32c66282ed629b0baf8e87de1dea162
MD5 f9a5c9a5d29d744e91acbfa64d0f048d
BLAKE2b-256 fc345a2f7e22bf4b9e9ebbd9b4f45f5b4e85f7e7b33f02860791428bf58f3e6f

See more details on using hashes here.

File details

Details for the file spotify_mpd_sync-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: spotify_mpd_sync-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for spotify_mpd_sync-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f70117e9fc682cf21df8bbd403e7e9cbfe1e53885a215702be614003e4acf6d2
MD5 e722a8ec03d0acf1a145f22f604f4d7a
BLAKE2b-256 bcb8b115d9547be5a9abc1fb94332c0d5fcf854ccbc066d8381c950bcf627f62

See more details on using hashes here.

Supported by

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