Why renaming a movie file, or moving it to a new subdirectory automatically removes the movie from a Collection and/or a Playlist that was added to??? Playlists and Collections (like the watchlist) MUST be agnostic of the files! We should be able to add stuff to a Collection or Playlist and be able to decide if we want them remove from them if there’s no playable file.
Make sure to disable Settings > [Server Name] > Library > Automatically empty trash after every scan.
This way, Plex should keep the library record and its association to playlists/collections, as well as any manual metadata changes, and be able to re-link the renamed file afterwards with that record.
thanks a lot my dude!
although this is a workaround, I stand by my request that the item should not be removed from the collection/playlist, and there should be another switch to enable/disable this behaviour ![]()
I believe the problem is that Plex is deleting the entry in the database on a rename before it scans to find it under the new name. Since - for a brief moment - it doesn’t exist on your server, the item’s presence on any list (collection, playlist, etc) is removed.
It would probably take a large change to how trashed items are handled to allow an item to exist on a list it used to be on after deletion. And if you do allow such a thing, how long do you allow this?
Until you manually decide to remove the unavailable item. And there should be a switch to enable/disable this behaviour. That’s my take.
I suppose that switch is called Empty trash automatically after every scan.
Partially. The trash contains many more things not just unavailable items in collections. But you can say it’s a workaround.
Turns out this workaround creates unwanted collateral changes. Without the auto empty trash, my Home tab is filled with duplications for files that are no longer there. So, I won’t use it and I now feel even stronger about the need to address this issue directly.
You remove those by manually emptying the trash after the new one is added.
I know, but this is what I’m trying to avoid, even more manual work and maintenance work.
Kometa might help in this situation.
I thought that’s what you wanted.
I agree that Plex automatically removing items from the library is problematic and there should be a feature to enable or disable this functionality.
Some cases would be the movie file being removed from the file system and you don’t notice that something bad has happened since the movie is gone from Plex.
Then there are the file management/ relocation of files that cause these issues too.
There should be an option where removal of any movie from Plex requires approval.
That’s what the checkbox Automatically empty trash after every scan is for. If disabled, Plex will keep the library records until you manually trigger the deletion. Items that are no longer found in your file system but listed in the library are highlighted by a trash can overlay (or can be found by filtering the library for trashed items → advanced filter).
I’ll test it out. “Trash” should be better defined with this setting. I assumed it was kind of technical debt not media entries lol.
But I just read this, is it actually creating a new entry if it finds a new file for the same media type?
It shouldn’t. From what I’ve seen, this will only happen if all mechanisms of Plex to recognize the file as identical fail. It might happen if you changed the library agent but never got to refresh the library metadata (resulting in old entries remaining matched to an old agent, while a new one is created as separate instance matched against the current library agent).
from the Collection/Playlist, not the library. This is why I want a differentiation.
But I get the confusion, sorry.
You’ll need some stub record to store the collection/playlist assignment. Leaving the question why you’re looking for that to be limited to those? What about your other metadata and artwork customizations?
I don’t need that. So, let me explain myself.
I’ve a server with 3k+ movies, many of them since the 2000s. I’ve an awful mix of codecs and containers, AVI, MOV, Mpeg, RMVB, RM, DixX, FL and others. And I created dozen of collections (not smart ones, this was before they even existed) containing all those movies.
Slowly I’ve been updating the library with new codecs/containers and a better folder structure. Every time I do that I need to remember on which collection the movie was and do many steps to replace it in the collection when the “automatically empty trash” is ON. When is OFF I face the opposite problem of having to manually remove the deleted old files.
So, I want an option for collections to work like the Universal Watchlist, where it does not matter if you have movie or not, does not matter the server, the item is there and agnostic of the file itself. That way I’d keep the “automatically empty trash” ON but have the collection remember the item.
Does it make sense?
So you have the option enabled to automatically update the library when changes are seen. That might solve your problem. That scan would only work on 1 item at a time and as long as you add a file before deleting the first, it should not remove the item from the collection/playlist. And then remove the duplicate when you remove the first file.

