Native Plex Movie agent deletes and creates items on file changes, resets posters

Server Version#: 1.20.0.3181

This issue actually occurred with the legacy Plex movie agent as well, but with the new agent in beta, I figured I could highlight the issue. Basically, when a file is swapped, the movie scanner will delete the movie item and recreate it. This has two impacts. First, the movie is added to the top of the Recently Added queue. Second, it resets the custom poster thumbnails. I can often see any custom posters I have uploaded if I edit the movie, and I have noticed that other locked fields like title remain locked, but not the artwork.

My TV libraries do not have this problem. If a file is replaced, the episode is not deleted and re-added. It just gets rescanned in place. It also does not have to do with multiple scans being run between the deletion of the old file and the addition of the new file. I often see only a single scan that triggers both the delete and create actions. The file deletion and addition happen instantly, and as mentioned, even for large TV episodes, the same behavior is not experienced.

I noticed this behavior as well when I did a mass rename of my library to try and meet the new convention for optional IDs in the filename. Even with Empty Trash turned off, a lot of the items in my library were deleted, re-created, re-matched, and metadata refetched. Even though some fields remained intact, artwork was completely lost, and sometimes the match was completely different (separate issue). I bring this up because in this case, the underlying file remained the same, it was just renamed. So there seems to be some common behavior when files are switched as well as renamed.

How do you organize your movie folder hierarchy? Do you place multiple movies in a single directory e.g. C:\Media\Movies, or do you place each movie in it’s own sub-directory e.g. C:\Media\Movies\Terminator (1984)\Terminator (1984).mkv? The latter seems to mitigate this issue, at least based on quick testing on my server.

I place my movies in their own sub-directory

I don’t experience this. I routinely swap files in Movie libraries without the movie being bumped to the top of Recently Added. “Recently Added” is vitally important to me!

I have Empty Trash off as well. I don’t have Scan my library automatically enabled (or available, even, on my platform).

It’s mostly Radarr API triggered scans or manually by me.

I keep movies in their own directories too.

I’ve grown comfortable that this doesn’t mess with my Library. I used to verify the new file was added before removing the old one. Now I’m comfortable deleting the entire old movie folder before putting a new one in place.

It’s worth noting that I do have Empty Trash on, though I had it off when I did a mass rename of my entire library.

I also do have Scan my library automatically on, along with partial scans. When I ran a manual scan (after the mass rename), I did not see movies added to the top of the Recently Added queue, but I did see their posters get reverted, and some get matched again (I noticed because a few movies got mis-matched after the rename).

The above settings work perfectly fine for my TV library though

AFAIR this has always been the case even with the old agent, however the new agent is faster, so it tends to see the removed, then added files faster.

Volts is correct, while perhaps not the solution or ‘fix’ that you want, disabling ‘scan automatically’ and ‘empty trash’ in particular, will avoid the delete > replace detection.

You can have your automated tools trigger a plex scan, and/or use the ‘scan every ## hours’ option.

Do you know if this was the case with the TMDB agent as well? I ask because the TVDB agent does not have this issue at all. While your suggestion is certainly a valid workaround, and I have just lived with it as such up until now, I do think the new scanner/agent afford us an opportunity to see if this is intended or optimal behavior, and if there is a way for the dev team to fix it.

By the way, I am curious if custom artwork will reset for you if you have Empty Trash off and you run a manual scan. When rebuilding my library, I did notice that it still would reset posters.

re: artwork, I would agree, that is is an issue that should probably be looked at.

I don’t use custom artwork, so it has never affected me.

plex has stated several times in the movie scanner preview/beta threads, that the tv agent will also be updated to the same system sooner or later.

so you are probably right, in that now is the time to get the issue looked at, while they are still working on it.

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