Deleted files not removed from library

Plex is so bad that when you had two copies of a file and one is deleted if will offer the deleted one instead of the existing one. And in the client side you will see the eternal spinning wheel of misfortune.

1 Like

That does not happen to me. Are you making sure that Plex is notified to do a library scan when a version of a file is deleted? You can do that with autoscan.

This seems a little unrelated for this thread…

BUT, I have this issue all the damn time :sob: (Apple TV)

I believe the setting ā€œEmpty trash automatically after every scanā€ would fix this issue, but I tend to keep that disabled as upgrading files with that enabled moves them to recently added and clears any manual metadata changes…

1 Like

Of course. The only way to fix it is to manually doing an Empty Trash. Or to set Empty Trash automatically after every scan, which I don’t do because I find it extremely dangerous (for example if a HDD fails there goes your collection history).

Not if you backup your plex appdata folder. But yes, this is totally off-topic.

Agreed, I’ve fallen foul of this before - my hard drive enclosure doesn’t automatically restart after a power outage for example, so the PC will come back on without my library mounted, so Plex trashes the whole library as if it never existed. So I leave that turned off, and therefore run into the ā€˜unavailable’ issue because for some reason Plex tries to play the deleted file, instead of the one that is there, even though it knows it is there. Have to manually remove the deleted file from file info.

Annoying, but yeah, off topic. Back OT, when is this rolling out to other clients? Any update? Haven’t seen anyone saying it’s failing…

2 Likes

One last reply to this off-topic topic. I have my media folder in my Plex server as a remote NFS mount and I have this setting enabled. There were numerous times when the NFS mount was acting up so Plex does not see all media. When that happens, I never had my collection history cleared out. I don’t know how that works but that’s the behavior I was seeing.

Have a look at my post Not Deleting Upgraded Files - Plex Media Server / Desktops & Laptops - Plex Forum

It seems there is an inbuilt protection to stop mass deletes, but its causing me issues as nothing is working.

Thank you for splitting this thread. However the thread title and what people are discussing is in my opinion not the major problem. The major problem is when you have two versions of the file and one is deleted, Plex will continue offering the deleted one when someone tries to play the file, which does not make sense, the other version is there and available.

This is a very old problem, I already created a thread about it long time ago but unfortunately, as it happens often, it was ignored.

https://forums.plex.tv/t/multiple-versions-of-same-media-delete-one-version-client-gets-stuck/759190/3

1 Like

I agree, the issue here isn’t about emptying the trash…

It’s about the fact Plex doesn’t ignore missing files when playing something. Logically speaking, if there is (was) two versions of the same file and one of them is missing, Plex should in no way make an attempt to play the one that is missing.

I’m happy to manually empty the trash, but Plex should be smart enough to ignore the missing files.

1 Like

I’m still wondering as to why I’m not experiencing this issue. My plex server is remote from my storage (synology NAS). I have empty automatically enabled. When any of the versions get upgraded or deleted, Plex automatically knows that and will update its database. When the network connection from the PMS to the NAS get severed, the built-in protection in plex kicks in to protect the whole library from getting trashed.

You do not have the problem because you have empty trash automatically activated. The problem comes when it is not.

Even forgetting about multiple versions of the file, if the file you are trying to play is not there you should receive an error, the client shouldn’t hang. There are multiple problems in this situation.

1 Like

After deleting files, you should always trigger a library scan, followed by empty trash.

If this isn’t clearing out the deleted files, there are usually two possible reasons:

  1. there is at least one folder added to the ā€œAdd Foldersā€ tab in the library properties, which is either non-existent, or inaccessible, or completely empty. In either of these cases, ā€œEmpty Trashā€ will not be performed.
  2. the primary Plex database file is damaged and must be repaired

Who said this? I can setup my system to check periodically for library updates (library scan) and empty trash once a week.

If emptying trash every time is a requirement then the system is allowing me to setup things wrongly and should be fixed.

And still, trying to play a file that does not exist should produce an error and the client should not hang. It is wrong from any way you look at it.

Then consider that recommendation fulfilled.
Still, points 1 and 2 from above need to be verified.

I am lost. So it is a requirement or not? If it is then document it as a requirement and remove the options in the GUI that creates the the incorrect situation.

Now I am lost. Of what requirement and what UI elements are you talking?

He is talking about the empty trash automatically feature. You said it is a requirement. If it is a requirement, then remove that option in the GUI so as not to allow users to disable it.

No, I did not. In fact, I usually advise against using it.

So we are clear there are problems in this. The ones I see:

  • A deleted file should not be offered to be played when there is another version of the same file.
  • If a deleted file is played and error should be displayed (i.e.: File not available) instead of the client hanging in the eternal spinning wheel of misfortune.
1 Like