gyarbij/plexist
About Plex+Playlist=Plexist, An application for recreating Spotify and Deezer playlist in Plex.
10K+
Plex+Playlist=Plexist, is a tool that synchronizes playlists between Plex, Spotify, and Deezer. It manages playlists, tracks, and metadata, allowing for seamless integration between these platforms. This README provides instructions on setting up Plexist using Docker and Docker Compose, detailing the environment variables and usage. (because Plex music playlist are a croc of tihs)
Clone this repository to your local machine:
git clone https://github.com/Gyarbij/Plexist.git
cd Plexist
pip3 install -r requirements.txt
python3 plexist.py
The will only run once unless you create a cronjob, etc. Docker is the recommended deployment method.
Environment Variables
PLEX_URL
: The URL of your Plex server.PLEX_TOKEN
: Your Plex API token.WRITE_MISSING_AS_CSV
: Set to Yes
to export missing tracks to CSV; No
otherwise.ADD_PLAYLIST_POSTER
: Set to Yes
to add posters to playlists; No
otherwise.ADD_PLAYLIST_DESCRIPTION
: Set to Yes
to add descriptions to playlists; No
otherwise.APPEND_INSTEAD_OF_SYNC
: Set to Yes
to append tracks to playlists instead of syncing; No
to sync.SECONDS_TO_WAIT
: Time in seconds between synchronization cycles.SPOTIFY_CLIENT_ID
: Your Spotify API client ID.SPOTIFY_CLIENT_SECRET
: Your Spotify API client secret.SPOTIFY_USER_ID
: Your Spotify user ID.DEEZER_USER_ID
: Your Deezer user ID.DEEZER_PLAYLIST_ID
: Deezer playlist ID or URL.DB_PATH
: Path to the SQLite database file (default: /app/data/plexist.db
).CSV_PATH
: Path where CSV files will be stored (default: /app/data
)./app/data
in the container to ensure persistent storage of the database and CSV files:
volumes: - ./plexist_data:/data
Update the compose.yaml
with your specific configurations, including API tokens and paths. A template is Here: compose.yaml
version: '3.8'
services:
plexist:
container_name: plexist
image: gyarbij/plexist:latest
environment:
- PLEX_URL=http://<your-plex-url>:32400
- PLEX_TOKEN=<your-plex-token>
- WRITE_MISSING_AS_CSV=Yes # Use Yes/No to control CSV export
- ADD_PLAYLIST_POSTER=Yes # Use Yes/No to add playlist posters
- ADD_PLAYLIST_DESCRIPTION=Yes # Use Yes/No to add playlist descriptions
- APPEND_INSTEAD_OF_SYNC=No # Use Yes/No to control sync mode
- SECONDS_TO_WAIT=84000 # Time in seconds between syncs
- 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-deezer-user-id>
- DEEZER_PLAYLIST_ID=https://www.deezer.com/en/playlist/10484834882
- DB_PATH=/data/plexist.db # Path for SQLite database
- CSV_PATH=/data # Path for storing CSV files
volumes:
- ./plexist_data:/data # Ensure volume matches the paths in environment variables
restart: unless-stopped
Run the following commands to start the Plexist service:
docker-compose up -d
This command will start the Plexist service in detached mode.
After starting the service, check the logs to ensure everything is running correctly:
docker-compose logs -f
Look for confirmation messages that indicate successful connections to Plex, Spotify, and Deezer, as well as database and CSV operations.
docker run -d \
--name=plexist \
--restart unless-stopped \
-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 to a csv
-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 or 1>, 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/App ID
-e SPOTIFY_CLIENT_SECRET= # Your Spotify client secret
-e SPOTIFY_USER_ID= # Spotify ID to sync (Sync's all playlist)
-e DEEZER_USER_ID= # Deezer ID to sync (Sync's all playlist)
-e DEEZER_PLAYLIST_ID= # Individual playlist
gyarbij/plexist:latest
Notes
http://
or https://
in the PLEX_URL# Optional x
) before running
``DB_PATH
is correctly set and that the directory exists with proper permissions.CSV_PATH
is writable and accessible.Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
docker pull gyarbij/plexist