rnagabhyrava / plex-playlist-sync

App to recreate spotify/deezer playlists in your local plex server.
GNU General Public License v3.0
179 stars 26 forks source link
apple-music deezer plex spotify ytmusic

Plex Playlist Sync

Create spotify and deezer playlists in your plex account using tracks from your server and keeps plex playlists in sync with original playlists.

This DOES NOT download any songs from anywhere.

Features

Prerequisites

Plex

To use Spotify sync

To use Deezer sync

Docker Setup

You need either docker or docker with docker-compose to run this. Docker images are available on the hub for amd64, arm64 and arm/v7 and will be auto pulled based on your platform.

Configure the parameters as needed. Plex URL and TOKEN are mandatory and either one of the Options (1,2,3) fields are required.

Docker Run

docker run -d \
  --name=playlistSync \
  -e PLEX_URL=<your local plex url> \
  -e PLEX_TOKEN=<your plex token> \
  -e WRITE_MISSING_AS_CSV=<1 or 0> # Default 0, 1 = writes missing tracks from each playlist to a csv
  -e APPEND_SERVICE_SUFFIX=<1 or 0> # Default 1, 1 = appends the service name to the playlist name
  -e ADD_PLAYLIST_POSTER=<1 or 0> # Default 1, 1 = add poster for each playlist
  -e ADD_PLAYLIST_DESCRIPTION=<1 or 0> # Default 1, 1 = add description for each playlist
  -e APPEND_INSTEAD_OF_SYNC=0 # Default 0, 1 = Sync tracks, 0 = Append only
  -e SECONDS_TO_WAIT=84000 # Seconds to wait between syncs \
  -e SPOTIFY_CLIENT_ID=<your spotify client id> # Option 1 \
  -e SPOTIFY_CLIENT_SECRET=<your spotify client secret> # Option 1 \
  -e SPOTIFY_USER_ID=<your spotify user id from the account page> # Option 1 \
  -e DEEZER_USER_ID=<your deezer user id> # Option 2 \
  -e DEEZER_PLAYLIST_ID= #<deezer playlist ids space seperated> # Option 3 \
  -v <Path where you want to write missing tracks>:/data \
  --restart unless-stopped \
  rnagabhyrava/plexplaylistsync:latest

Notes

Docker Compose

docker-compose.yml can be configured as follows. See docker-compose-example.yml for example

version: "2.1"
services:
  playlistSync:
    image: rnagabhyrava/plexplaylistsync:latest
    container_name: playlistSync
    # optional only if you chose WRITE_MISSING_AS_CSV=1 in env
    volumes:
      - <Path where you want to write missing tracks>:/data
    environment:
      - PLEX_URL= <your local plex url>
      - PLEX_TOKEN=<your plex token>
      - WRITE_MISSING_AS_CSV=<1 or 0> # Default 0, 1 = writes missing tracks from each playlist to a csv
      - APPEND_SERVICE_SUFFIX=<1 or 0> # Default 1, 1 = appends the service name to the playlist name
      - ADD_PLAYLIST_POSTER=<1 or 0> # Default 1, 1 = add poster for each playlist
      - ADD_PLAYLIST_DESCRIPTION=<1 or 0> # Default 1, 1 = add description for each playlist
      - APPEND_INSTEAD_OF_SYNC=0 # Default 0, 1 = Sync tracks, 0 = Append only
      - SECONDS_TO_WAIT=84000
      - SPOTIFY_CLIENT_ID=<your spotify client id>
      - SPOTIFY_CLIENT_SECRET=<your spotify client secret>
      - SPOTIFY_USER_ID=<your spotify user id>
      - DEEZER_USER_ID=<your spotify user id>
      - DEEZER_PLAYLIST_ID= #<deezer playlist ids space seperated>
    restart: unless-stopped

And run with :

docker-compose up

Issues

Something's off? See room for improvement? Feel free to open an issue with as much info as possible. Cheers!