Git Product home page Git Product logo

plexplaylistcopy's Introduction

Plex Playlist Copy

This python code is utilized to copy a playlist from one server in your account to another. It will not move any music files, so the music must already be installed on both servers. It will just recreate the playlist on the new server using the metadata from the playlist to find the existing songs on the target plex server. If an exact match is not found, it will do a search of similar songs, and allow you to pick one or skip it all together.

If the playlist exists, then it will find any new or missing items in the existing playlist, and add those into the playlist as well.

This is useful if you maintain multiple servers at multiple locations (for instance a main home and a summer home) where you want to preserve your playlists on both servers to execute locally rather than across the network. It is also useful if you are settting up a new server replacing the old one, and things such as files locations are not the same yet you want to keep your playlists.

Keep in mind this is doing a very rudimentary match based on metadata only. It is not doing any fingerprinting, hashing or any other methodology. It is assuming that you likely have the same library of music on both servers, but just want to have the same playlists on both servers as well.

Also, this is done as a quick and dirty python script. A known limitation right now is if the titles of the songs don't exactly match, it will show up as missing on a sync so you must manually skip those. It might be something I resolve but since my libraries are very close on both servers, it has not been a big concern for me.

Also, there is very little protection built into this script for user error, so please enter all input accurately. I just did this for my own needs quickly, but will probably improve over time. So it will crash on things like choosing none for a server and the likes.

This code requires python v3.6 or higher.

To use, first make sure the plex python library is installed on your python instance:

pip install plexapi

Then run:

python ./src/copyplaylist.py

It will prompt you for your plex username, password and two factor code.

Then choose the source server by number from the list.

Then it will ask you to choose the target server, again from the list by number

Next, it will list out all playlists on that server, and again choose by entering the number from the list

Next it will ask you to enter the textual name of the playlist you either want to sync or create. Enter an existing one to sync, or any text to create a new playlist.

You will then see it going song by song. If it finds exact matches it will proceed to the next track.

If it does not find an exact match, it will give you a list of possible matches by doing a search on the title. Either select an acceptable match from the list by number, or type 'n' followed by the enter key to skip this track.

After all songs have been completed, it will write the results to the target server. If you end the program before it has finished all of the tracks, no results will be written.

This is experimental code so use at your own risk! I am not responsible for any damage to your plex instances.

plexplaylistcopy's People

Contributors

jim-olsen avatar paviro avatar

Watchers

 avatar

Forkers

drallas

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.