Plex deletes movie from database and re-adds it when path/file is modified

I just experienced something really annoying (not the first time this exact thing has happened). When I changed the folder name of a movie after also doing a minor metadata change to the file, plex decided to add the movie as a recently added entry. When I realised this I quickly tried to merge the the original movie entry with the new one so that I wouldn’t lose my playback progress. But the library scan was able to complete before I got the time to do this and deleted all the watch history for all users on this movie.
I know I could have turned off “Empty trash automatically after every scan”, but then I would have to constantly delete old library entries in plex manually. So I would prefer if plex could handle detecting if a movie already exist on it’s own.
After I compared com.plexapp.plugins.library.db with an older backup, it looks like this happened because the old entry was added with themoviedb while the new used imdb.

It’s a little more work, but when I update the quality or move a file to a new location, I use the “Fix Match” option before I do anything. Originally, I used the the “The Movie Database” agent - it was the default agent at the time, and now I use the “Plex Movie” agent.

When you use the Fix Match option, make sure you select the agent you want to use, and the watched status and other info should be maintained. I’m not sure how it will work if you leave the “Automatically Empty Trash” enabled, as I have that option turned off. You might have to disable it temporarily and manually empty trash, then re-enable it.

I usually stop the plex server before I move files. (I think its the recommended way to do it) Then restart the server after the files have all been moved to their new location.

Restarting the server constantly won’t be an option since I’m not the only one that use it.
I usually disable “Empty trash automatically” temporarily if I’m going to make changes to a lot of files, but this time didn’t since it was just one file. And I usually don’t have to since this doesn’t happen often, but it really sucks when it do.
I don’t really want to fidget with the settings every time I have to make changes to my media library.
Themoviedb has the imdb id as well on most movies, so I don’t think a fix for this should be hard to implement. The same goes for tv-shows on both thetvdb and themoviedb, but I’m not sure how thorough people are at adding the external id’s to tv-shows on themoviedb.

Just trying to help… :zipper_mouth_face:

Wait patiently, someone may come up with a solution that works for you. :wink:

I’m so sorry! Didn’t mean to sound unappreciative. Thank you for your detailed reply :slight_smile:
I’ve just gotten the feeling that most issues with plex that are not deemed important and can be worked around by doing tedious steps, won’t be prioritized to be fixed.
Sorry for being so defensive.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.