Giter VIP home page Giter VIP logo

plex-playlist-sync's Introduction

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

  • From Spotify: Sync all the given user account's playlists to plex
  • From Deezer: Sync all 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.

Prerequisites

Plex

  • Use Plex Credentials (Requires You to have Remote Access on your Plex Server):
    • Plex Username and Password
    • Plex Server Name you wish to sync with
  • Or Use Local IP and Token (Rquires you to be connected to the same network as the plex server):

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 \
  -p 8888:8888/tcp \
  -v <directory where csv stored>:/data \
  -v <directory to store spotify keys>:/caches \
  -e PLEX_URL=<Your local plex url> \
  -e PLEX_TOKEN=<Your token> \
  -e PLEX_USERNAME=<Username / email for your Plex Account> \
  -e PLEX_PASSWORD=<Password for your Plex Account> \
  -e SERVER_NAME=<Name for your plex server ie plex> \
  -e WRITE_MISSING_AS_CSV=<1 | 0> \
  -e APPEND_SERVICE_SUFFIX=<1 | 0> \
  -e ADD_PLAYLIST_POSTER=<1 | 0> \
  -e ADD_PLAYLIST_DESCRIPTION=<1 | 0> \
  -e APPEND_INSTEAD_OF_SYNC=<1 | 0> \
  -e SECONDS_TO_WAIT=43200 \
  -e SPOTIFY_CLIENT_ID=<Your ID> \
  -e SPOTIFY_REDIRECT_URI=http://localhost:8888/callback \
  -e SPOTIFY_CLIENT_SECRET=<Your Secret> \
  -e SPOTIFY_USER_ID=<Your ID / Username> \
  -e DEEZER_USER_ID=<your spotify user id> \
  -e DEEZER_PLAYLIST_ID= \
  --restart unless-stopped \
  dregsozworld/plex_playlist_sync:latest

Notes

  • Include http:// in the PLEX_URL
  • Remove comments (ex: # Optional x) before running
  • Do Not change spotify_redirect_url pls

Docker Compose

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

version: "2.1"
services:
  playlistSync:
    image: dregsozworld/plex_playlist_sync
    container_name: playlistSync
    ports:
      - "8888:8888/tcp"
    volumes:
      - <directory where csv stored>:/data
      - <directory to store spotify keys>:/caches
    environment:
      - PLEX_URL= <Your local plex url>
      - PLEX_TOKEN=<Your token>
      - PLEX_USERNAME=<Username / email for your Plex Account>
      - PLEX_PASSWORD=<Password for your Plex Account>
      - SERVER_NAME=<Name for your plex server ie plex>
      - WRITE_MISSING_AS_CSV=<1 | 0 >
      - APPEND_SERVICE_SUFFIX= <1 | 0>
      - ADD_PLAYLIST_POSTER= ><1 | 0 >
      - ADD_PLAYLIST_DESCRIPTION= < 1 | 0 >
      - APPEND_INSTEAD_OF_SYNC= <1 | 0 >
      - SECONDS_TO_WAIT=43200  #12 Hours Default
      - SPOTIFY_CLIENT_ID= <Your ID>
      - SPOTIFY_REDIRECT_URI=http://localhost:8888/callback #DO NOT CHANGE
      - SPOTIFY_CLIENT_SECRET= <Your Secret>
      - SPOTIFY_USER_ID= <Your ID / Username > # Do not need anymore
      - DEEZER_USER_ID=<your spotify user id>
      - DEEZER_PLAYLIST_ID= # multiple playlists are space separated
    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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.