This synchronizes watched, unwatched, and partial watched media to the latest used on whichever of the two servers. It does directly access the database, and requires a stop/start of the server, but I have tested it against thousands of records (and have been playing with the Plex DB extensively since the open source days).
I’m using this to keep a failover server up to date, and will continue to until I decide if porting this into a Plugin will remove the need for the stop/start. Everything you need to know can be found on the GitHub repo:
Why is this better at keeping watched status synced than using the Trakt plugin? I have used Trakt for quite a while and once I got it set up I have seen no problems and I do not seem to be missing anything.
Trakt and plex-sync work on a user level. So each user has to set everything up and authenticate. Plex-db-sync works on an administrative level, syncing all users and media that are common between the servers. So if you have 5 users who barely know how to turn on the TV, it’s seamless, or if you have a backup Plex server, etc.
Thanks for the answer. I guess I don’t need to switch because I am the only user and I do know a bit more than “how to turn on the TV” and I do not need the other features.
Again thank you anyway.
@Elijah_Baley said:
Thanks for the answer. I guess I don’t need to switch because I am the only user and I do know a bit more than “how to turn on the TV” and I do not need the other features.
Again thank you anyway.
Does this also sync collection data? That is if I have a collection on server A will it be created on server B?
Not at the moment, but I’ve written scripts that tag off filenames, so I don’t see why I couldn’t make this sync Collections, too. I could have it create collects where any piece of media from Server 1’s collection exists in Server 2 (and visa versa). Have to be careful as one server may have media the other doesn’t.
One more thing that might be of use. Can this be installed on a Shield TV?
If the Shield supports sqlite3 and can mount a share where the other DB is, then yes.
I think if you were to also add syncing of playlists you would have a really great script that would go far beyond Trakt for people with multiple Plex servers!
@cayars said:
I think if you were to also add syncing of playlists you would have a really great script that would go far beyond Trakt for people with multiple Plex servers!
I can look into this. I just added syncing of “Sharing Labels”, or the tags that allow you to filter what media you share to other users.
This is brilliant! Also something I have looked for multiple times. I have 2 Plex servers in different locations, both running on Windows. I use Trakt but have many users that don’t have it or want to mess with it. I would love to be able to sync up watched status between the two, even if other things didn’t sync up.
Are you still developing this further? Did you ever figure out how to create a plugin that might allow it to sync without a PMS stop/start?
Just following up. I have read over your page on github, but I am still unsure how I would go about setting it up to run on windows machines.
From what I see I think I would need to install SSHFS for windows. Any help would be appreciated. I have several Plex servers running on the home network that all have the same files available. I also have some off site that have different files.
This works perfectly and much better than the Trakt plugin. Especially since Plex is doing away with plugins, this is the best replacement… and I’ve been looking for a while, I just haven’t had time to do something up myself.
At some point, I’ll dig deeper to see how you did it (didn’t look into the code). This works amazingly for individual users without the use of a token.
The main issue I struggled with regarding Trakt was, especially when using the Plex Home, Trakt couldn’t differentiate between the Home accounts being used and still marked everyone else’s progress as my own (I’m very protective of my watched progress!).
Your script is able to use the database to tell the difference and I love the log output to indicate whether there are changes and which user.
I’ve set this up as a cron job to sync every 30 minutes and so far the only time I can tell that it has run is if the Plex app I’m using is sitting at the menu (not playing anything) then you can visually see the server go “unavailable” then swiftly come back.
When I had the script set to run more frequently (~5 min) then if I got caught up in conversation or something then it would be annoying trying to navigate around when the server restarts, but again… personal issue really. It would be great though to figure out a way to have the script do its thing and not have to restart the server.
If you ever want someone to test anything out for you, I’m your guy!
Yeah from what I see you need anyway to mount your remote file system to your local Windows.
I’m gonna take a look at it over the next few days and if I come up with anything I will let you know. Hopefully @fmstrat may see this and give us some pointers.
Wondering if anyone has gotten this to work from the Shield’s? I have a couple of shields and would love to sync between them as I have both of them presented out to friends and family and would love to have them sync’d. Traktd has been troublesome to sync all my users watched status’
I am attempting to migrate from my current plex vm, to a newly setup vm. I do not want to simply copy the database over, as I was hoping to clean up my data files. So I setup a clean plex install, added all my media folders, scanned everything in. I am signed into both plex with the same user. I have two local home users, plus many shared. When I run the sync, it is syncing my main admin user, but the local home users seem to be getting the admin users watch status. Am I doing something wrong? Thanks
Is this still functional? The process to determine your Library ID does not seem to be relevent any more.
the instruction is find the IDs for the libraries on each server you would like to sync. These IDs can be found at the end of the URL when viewing the library in your browser (like .../section/ID ).
My URL when viewing a library in my browser looks nothing like that now.
2Flibrary%2Fsections%2F5%2Fall%3Ftype%3D1