Python code to copy a playlist from one plex server to another

Well I have been waiting for this feature for a long time and it has not been available. I have two servers in my two different houses, as I want to localize the traffic due to internet issues and just speed rather than trying to access one through the internet. I spend a long time at both locations so this just makes sense.

So I wanted to have the same playlists at both locations, but using the local media instances to that server. I only wanted to copy the playlists, not the media itself, and find the matching media on the target server. I wrote up some python to do this (rough first pass) and it works like a charm saving me hours. Here is the link to github if anyone is interested:

https://github.com/jim-olsen/PlexPlaylistCopy

Note that it tries to do exact matches first (very rudimentary based on title/album), and if it doesn’t find an exact match, it will give you a list of similar tracks using the plex query mechanism. You can than choose one, or choose to skip. I was able to move a 400 song long playlist in minutes. It will also perform updates to existing lists, adding any new songs. See the notes in the readme for limitations on this.

Again, all very primitive but it saves me a ton of time so I thought I would share it out there.

1 Like