This fork is based on great plex playlist sync from rnagabhyrava https://github.com/rnagabhyrava/plex-playlist-sync. It removes Deezer (as I do not need it. but should be actually compatible) and adds ability to download files. It needs 2 folders. A place where SpotDL downloads files and Plex music folder. So add these to final enviroment configuration:
PLEX_FOLDER - Plex Music library - It will be sorted by default way /Plex_folder/Artist/Album/Track DOWNLOAD_FOLDER - Download folder - It will by sorted by playlist
While both folders have the same songs for repeated usability of this tool they will not use twice as much space. They are hard link, not copies of files.
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.
- From Spotify: Sync all of the given user account's public playlists to plex
- From Deezer: Sync all of the given user account's public playlists and/or any given public playlist IDs to plex
- --- New ---
- Option to write missing songs as a csv
- Option to include poster and description in playlists.
- Plex server's host and port
- Plex token - Don't know where to find it?
- Spotify client ID and client secret - Can be obtained from spotify developer
- Spotify user ID - This can be found on spotify account page
- Deezer profile ID of the account from which playlists need to sync from
- Login to deezer.com
- Click on your profile
- Grab the profile ID from the URL
- Example: https://www.deezer.com/us/profile/9999999 - Here 9999999 is the profile ID OR
- Get playlists IDs of playlists you want to sync
- Example: https://www.deezer.com/us/playlist/1313621735 - Here 1313621735 is the playlist ID
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 -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
- Include
http://
in the PLEX_URL - Remove comments (ex:
# Optional x
) before running
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
Something's off? See room for improvement? Feel free to open an issue with as much info as possible. Cheers!