All Projects → XDGFX → Ppp

XDGFX / Ppp

Licence: gpl-3.0
Sync music playlists between your local music library and Plex!

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ppp

arch-plexpass
Docker build script for Arch Linux base with Plex Pass Media Server installed
Stars: ✭ 21 (-63.16%)
Mutual labels:  plex, media-server
Docker Compose Usenet
Docker-powered usenet pipeline
Stars: ✭ 240 (+321.05%)
Mutual labels:  plex, media-server
Go Plex Client
A Plex.tv and Plex Media Server Go client
Stars: ✭ 85 (+49.12%)
Mutual labels:  plex, media-server
Arch Plex
Docker build script for Arch Linux base with Plex Media Server
Stars: ✭ 10 (-82.46%)
Mutual labels:  plex, media-server
Unsonic
Unsonic, the un-Subsonic music server.
Stars: ✭ 20 (-64.91%)
Mutual labels:  music-library
Hama.bundle
Plex HTTP Anidb Metadata Agent (HAMA)
Stars: ✭ 740 (+1198.25%)
Mutual labels:  plex
Theme.park
A collection of themes/skins for your favorite apps.
Stars: ✭ 714 (+1152.63%)
Mutual labels:  plex
Getsubtitles
一步下载匹配字幕
Stars: ✭ 686 (+1103.51%)
Mutual labels:  plex
Tooloop Os
Tooloop OS is a minimal installation of Ubuntu Server with some post-install customization to fit the needs of public multimedia installations.
Stars: ✭ 44 (-22.81%)
Mutual labels:  media-server
Muximux
A lightweight way to manage your HTPC
Stars: ✭ 1,008 (+1668.42%)
Mutual labels:  plex
Quodlibet
Music player and music library manager for Linux, Windows, and macOS
Stars: ✭ 918 (+1510.53%)
Mutual labels:  music-library
Media Server
WebRTC Media Server
Stars: ✭ 821 (+1340.35%)
Mutual labels:  media-server
Navidrome
🎧☁️ Modern Music Server and Streamer compatible with Subsonic/Airsonic
Stars: ✭ 932 (+1535.09%)
Mutual labels:  media-server
Iptv.bundle
Plex plug-in that plays live streams (like IPTV) from a M3U playlist
Stars: ✭ 739 (+1196.49%)
Mutual labels:  plex
Gogglesmm
Goggles Music Manager
Stars: ✭ 41 (-28.07%)
Mutual labels:  music-library
Bobarr
🍿 The all-in-one alternative for Sonarr, Radarr, Jackett... with a VPN and running in docker
Stars: ✭ 697 (+1122.81%)
Mutual labels:  plex
Plex.py
Python interface for the Plex Media Server API
Stars: ✭ 22 (-61.4%)
Mutual labels:  plex
Sonarrplex
📡 View and manage your shows in Sonarr directly in the Plex app
Stars: ✭ 39 (-31.58%)
Mutual labels:  plex
Flox
Self Hosted Movie, Series and Anime Watch List
Stars: ✭ 901 (+1480.7%)
Mutual labels:  plex
Rtsp Simple Server
ready-to-use RTSP / RTMP server and proxy that allows to read, publish and proxy video and audio streams
Stars: ✭ 882 (+1447.37%)
Mutual labels:  media-server

PPP

Plex Playlist Pusher (Python Re-write)

Looking for the original Bash version? Find it here


A simple Python 3 script used to automatically:

  • load .m3u playlists from a local directory (maybe your MusicBee library... Can't be the same directory as your PPP installation!)
  • load music playlists from Plex
  • compare the two, merging any new tracks or entire playlists
  • push the updated playlists back to Plex using the Plex Playlist API (https://forums.plex.tv/t/can-plexamp-read-and-use-m3u-playlists/234179/21)
  • copy the updated playlists back to your local directory

This will keep Plex playlists and local playlists synchronised. If you want to delete a playlist or song from a playlist, it must be removed from BOTH local and Plex playlists.


Usage instructions

  1. Install Python 3 if you haven't already
  2. Download the latest release of PPP from here
  3. For first run, see Setup
  4. Run PPP with Python 3
usage: PPP.py [-h] [-setup] [-nobackups] [-retention n] [-nocleanup]

optional arguments:
  -h, --help    show this help message and exit
  -setup        Force-run the setup procedure
  -nobackups    Disable backup of local playlists completely!
  -retention n  Number of previous local playlist backups to keep (Default 10)
  -nocleanup    Disable removal of .tmp directory (for debugging only)

Setup

PPP will guide you through a setup on first run, and attempt to help you find all required variables.

  • Variables are saved to variables.json
  • If needed this can be edited manually

Alternatively rename example-variables.json to variables.json and edit the file manually.


Automation

Linux

Use crontab. You may need to apply this fix.

Example crontab:

* * * * * cd /path/to/PPP && /usr/bin/python3 /path/to/PPP/PPP.py >> /path/to/PPP/PPP.log 2>&1

Windows

Use task scheduler? I haven't tested it.


Variables (Reference)

Running setup should help you find all these variables!

VARIABLE DESCRIPTION EXAMPLE
server_url the url of your Plex server, as seen by whatever you're running PPP on "http://192.168.1.100:32400"
check_ssl validate, or ignore SSL certificate ('"False"' for self signed https) "True"
plex_token find it here "A1B3c4bdHA3s8COTaE3l"
local_playlists path to the local playlists you want to use, relative to PPP "/mnt/Playlists"
working_directory path to PPP working directory, a directory accessible by both PPP and Plex "/mnt/PPP"
working_directory_plex path to PPP working directory as seen by Plex. Change it if Plex is running in a container and cannot see working_directory "/data/mnt/PPP"
section_id the library section which contains all your music (only one section is supported by the Plex API) "11"
local_prepend path to be ignored in local playlists "Z:\\Media\\Music\\"
plex_prepend path to be ignored in Plex playlists "/mnt/Media/Music"
local_convert only if local playlists are in a different directory format to your PPP machine "w2u"
plex_convert only if you Plex playlists are in a different directory format to your PPP machine False
--- EXAMPLE LOCAL_PLAYLIST ---
Z:\Media\Music\Andrew Huang\Love Is Real\Love Is Real.mp3
Z:\Media\Music\Ben Howard\Noonday Dream\A Boat To An Island On The Wall.mp3
Z:\Media\Music\Bibio\PHANTOM BRICKWORKS\PHANTOM BRICKWORKS.mp3

--- EXAMPLE PLEX_PLAYLIST ---
/mnt/media/Music/Andrew Huang/Love Is Real/Love Is Real.mp3
/mnt/media/Music/Ben Howard/Noonday Dream/A Boat To An Island On The Wall.mp3
/mnt/media/Music/Bibio/PHANTOM BRICKWORKS/PHANTOM BRICKWORKS.mp3

In the examples above, local_prepend is "Z:\\Media\\Music\\" and plex_prepend is "/mnt/Media/Music"

In this example, PPP is running on a machine which uses UNIX paths (/ not \), and so local_convert is "w2u" - which means Windows paths are converted to UNIX paths.

If running PPP on Windows and your playlist paths are UNIX, use "u2w", and if both paths are the same format use false.

Why are there so many backslashes? You need to double any backslash, because normally it's a special 'escape character' which would break the code. You need to 'escape' the 'escape character' (https://stackoverflow.com/questions/19095796/how-to-print-backslash-with-python)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].