Trash emptied automatically even when option is disabled.

Newly created TV library called “Test” Added a series, named according to Plex standards, and all was matched.

Removed the folder, season folders, and files and a few minutes later went to empty trash, clean bundles, etc to clean up the library.

To my surprise, it was automatically deleted. Not good, 'cause I have a drive connected by USB that may accidentally become disconnected occasionally.

Checked Settings >> Server >> Library and “Empty trash automatically after every scan” is definitely NOT enabled. I do know that a few of days ago I had to manually empty trash in another TV library when I added a new version of an episode and removed the old version, so it seems to be just this new library. Thinking it’s somehow related to this problem with recent matches…

the same “Test” library has mis-matched TV shows matched properly in my Regular TV library.

logs attached.

A little impatient, perhaps, but bumping.

This “bug” only seems to affect the TV library I created a few days ago. Previous libraries respect the DISABLED “Empty trash automatically after every scan” and do not auto delete on a scan. The new TV library automatically deletes each time it scans. The unavailable/trash icon is overlaid as expected.

Attaching new logs, which should have the auto delete mis-function in the new libray, and the correct way in another older library.

@leelynds said:
A little impatient, perhaps, but bumping.

This “bug” only seems to affect the TV library I created a few days ago. Previous libraries respect the DISABLED “Empty trash automatically after every scan” and do not auto delete on a scan. The new TV library automatically deletes each time it scans. The unavailable/trash icon is overlaid as expected.

Attaching new logs, which should have the auto delete mis-function in the new libray, and the correct way in another older library.

This screen capture shows it’s unavailable pending full deletion. Unavailable is shown when PMS detects the parent directory/path is not present. Were only the file(s) gone, it would have been removed from the DB.

Your use of the word ‘Deleted’ can be alarming so please do be careful and qualify statements carefully.

I do request you try to give us some time in replying before bumping and cross posting again. Cross posting only makes more work for us.

  1. Is the media physically deleted from the storage or only removed from Plex? This is an important distinction
  2. what happens when you re-insert the media? Does it ‘come back’ ?

PMS does not like its media disappearing. It’s a server and, as such, expects the media to be there to serve. When an entire directory/path is gone, it is smart enough to suspect a system problem. This is why it flags the media with Red . Depending on the actual error condition, you will see Yellow or Red.
When PMS is convinced it’s gone, it will delete it.

If your Library makes frequent updates, and the media is not reconnected within a reasonable time, PMS will remove it.

To be clear…and I thought I was originally :wink:

“Empty trash automatically after every scan” is disabled on the server. “Allow media deletion” is disabled. I expect that I will have to empty trash manually when a file is removed from the file system and I expect to see the Trash icon, and the warning the file is unavailable.

I created a new TV library a few days ago, and added a few TV shows.

I deleted a TV show from an internal drive, including all sub-folders and files which was included in the new TV library

Within a minute or so, Plex auto-scanned a change in the file system, and automatically removed the show from the new TV library. If I had “Empty Trash Automatically” enabled, I would expect the file to be removed from the library. I do not have that option enabled.It has never been enabled, nor has the option to delete media.

About a day later, I deleted another show (from the hard drive) from the new TV library, to confirm the problem. Again it was automatically removed from the Library, no trash icon was displayed.

To test further, I added a TV show to a TV library created 2 or 3 years ago. I let Plex auto-scan scan and identify the series, generate thumbnails, and settle down. I then deleted the complete show, including all sub-folders and files from the internal hard drive. This time, the expected behavior occurred. A trash icon was overlaid on the series, and it was labeled unavailable. I had to empty the trash manually.

Is the media physically deleted from the storage or only removed from Plex? This is an important distinction

:smiley: Yes, because I physically deleted intentionally. The problem is it was removed from Plex, and should not have been because I do not have any of those options enabled.

what happens when you re-insert the media? Does it ‘come back’ ?

No media has been dis-connected, it’s an internal drive on the computer If you are asking what happens if I re-add the TV show, I expect it will re-appear, but I haven’t tried that.

Again, and I think this is important, this “bug” only happens on the new TV library created a few days ago. The older TV libraries do not automatically remove an item from the library.

I will create a new test library and attempt to replicate.

As always, I will need your logs :smiley:

I do request, to make it easier for me, the server be otherwise quiescent while you do this. Your previous set of logs showed progress updates as someone was using it. Those are voluminous

@ChuckPa – two sets of logs in the first 2 posts. The logs in the second post should have the series from the older library that DID NOT automatically remove from old TV library, as well as an instance where the series WAS automatically removed from the new TV library.

I can go thru the procedure again, if you think it’s necessary, for new logs.

To help me write this up with my “Steps To Reproduce” part, please give me the step-by-step of how you can recreate this.

I already have a new library section named in your honor :smiley:

Actually, I sort of hope you can’t reproduce it, because it it is a bug, it could hurt those with removable media significantly. At the same time, I hate when things screw up on my system.

Pretty simple to replicate. Make sure “Automatically delete trash” is disabled, and auto update libraries is enabled. You would know better than me if those settings are important before the library is created. In my case, they were the same way they always have been.

Add a couple of shows to the new library and once matched, delete or move one of the series completely out of Plex’s view. In my case, it was 2 or 3 days later that I removed the files. It was just a test library for another issue, the TV mis-match thing.

If it’s a bug in new TV libraries, Plex will auto-scan when it detects the change, and instantly, the series will no longer appear in the library. If you happen to be on the “alerts” page you can watch Plex report it is deleting an item in the library.

I went through your sequence.

What you are seeing is 100% correct behavior.

  1. You removed the media and updated the Library
  2. The trash did not empty
  3. The red trash can shows the media has been deleted but still exists in the database / PMS’s internal trash can. This is the ‘soft deletion’.
  4. Empty trash removes the final traces, marking all the metadata folders and metadata database records as invalid.
  5. When Clean Bundles next runs, those, now-invisible, items will be fully purged from the database and metadata storage

You will also observe, while the Red trash can will appear in the dashboard, you’ll see the Yellow trash can when you go into the Library. It will be marked as unavailable. This is your first indication of ‘soft deletion’ or ‘media missing’.

@ChuckPa

That is the correct behavior and it does happen on older libraries. Exactly that way. That is how I want it to work, and how it should work.

I can’t explain any better, but on the NEW TV library, and ONLY on the new library, the same procedure removes the item from my library, WITHOUT any interaction from me.

The item is simply no longer listed in the library. Anywhere. A trash icon never appears (as it does on my older libraries) I can’t get to the “unavailable” warning, because the item was removed automatically by Plex.

I’m assuming, because I have never had “Empty Trash Automatically” enabled, that when you physically remove the files, the item is removed from the library automatically by Plex. In that case, you won’t see the Trash icon. No? If not, what does that option do?

I just did it on the new library I created for you. Old or new, it makes no difference

There is one known ‘oddity’ and it pertains to “Recently Added” only.

If, you remove something recently added, movie or series, while it is in Recently Added, it can appear ‘stuck’ there until there is a text file or something. This is documented and the dev team is trying to figure it out.

If this is what you’re speaking of but seeing another facet of it, this would be worthy of contributing. I can’t replicate your scenario here regardless how many ways I try.

@leelynds said:
I’m assuming, because I have never had “Empty Trash Automatically” enabled, that when you physically remove the files, the item is removed from the library automatically by Plex. In that case, you won’t see the Trash icon. No? If not, what does that option do?

If you don’t empty the trash, it is considered a ‘soft delete’ . All of the metadata is held. Soft delete and unavailable (USB drive unplugged) function the same. The only difference is icon color dashboard versus in the library.

It really makes good sense to have the trash auto empty as this clears the icons. Players won’t get a ‘cannot play this item’ message

Even with the icons gone, should you put the media back in place, PMS matches it, it will find the already-present metadata because the bundles have not been cleaned. Cleaning bundles is the ‘Ok, sweep the floor and everything not attached to something goes’.

@ChuckPa

If you don’t empty the trash, it is considered a ‘soft delete’ . All of the metadata is held. Soft delete and unavailable (USB drive unplugged) function the same. The only difference is icon color dashboard versus in the library.

I believe I understand all of that. Perhaps I have not made it clear. From everything you have said, I should be getting a trash icon in that library because I don’t have empty trash automatically enabled.

What I am seeing is the item removed from the library, with absolutely no interaction from me. The older libraries require the manual interaction. The new library does not.

Let’s leave it at this for now. I will create a new TV library sometime, leaving all of my settings the same and see if I get the same auto-remove from library glitch (notice I didn’t say delete?) to occur when it shouldn’t. Maybe it’s a one off thing for this recently created library. You may hear from me again.

A new attempt to explain the problem, because it seems something was lost in the translation the first time.

I will ask the same question, a different way.

A “soft delete” should occur when I physically delete the files from an internal drive because I have “Automatically empty trash” disabled. I should be required to manually empty trash and clean bundles to remove all traces of the deleted item from my library.

Why is Plex automatically removing the item from my TV library, so that I can not find it anywhere, when I expect to see a trash icon indicating the item is unavailable?

At this point in time, I don’t care about the “clean bundles” action or any of the final steps in cleaning up the database, they are irrelevant. I just want Plex to respect my option to leave the item in my library, but mark it as unavailable and place a trash icon on the item. I don’t care what color the icon is. That is also irrelevant.

Pictures are worth a thousand words.
First, the recently created TEST TV library. As you can see, the Odd Couple exists in the library.

Now I physically remove the Odd Couple series from the hard drive. The Plex status page shows this. The item has been deleted. No interaction from me within the Plex interface.

Now the TEST library looks like this. The Odd Couple has been completely removed. Again – THERE WAS NO INTERACTION WITH PLEX, I expect to see a Trash icon over the Odd Couple, but it’s just gone

The following images are from an older TV library, “TV Shows” It should be noted the actual Odd Couple files are located on the same drive. Note the difference in the status page when I physically delete the files from the hard drive. It has noticed a change in the Library, but does not delete an item.

And, now the older TV library shows a Trash can over the Odd Couple, indicating it has been "Soft deleted.

Hoping the pics will sort of my prove there is a difference in how the two TV libraries deal with physically deleting an item from the library

And naturally, the logs for all of this.
Running Windows 10, Plex Server Version 1.3.3.3148

thanks @trupmp81 for that information. I understand that “Automatically Empty Trash” has nothing to do with the actual, physical deletion of the file. My understanding it is only related to removal of the item from the library, and have only mentioned it here because I expect a soft delete because I have that option DISABLED.

In this case the files are on the same internal drive, connected by SATA cable to the motherboard of the server. I have disabled any hibernation or sleep options on the drives.

In any event, the drive was “awake” enough to completely remove the item from the “TEST” library without any interaction from me within a minute or so of physically deleting the item. 10 minutes later, it “soft deleted” an item on the same drive in “TV Shows” library, again, within a minute or so of actually deleting that item from the drive.

Although the shows were the same name, they were not located in the same place on the drive. Each library pointed to different locations. The test library was pointed to “D:\Plex\Test” and the other library was pointed to “D:\Plex\SD TV”

Shouldn’t I expect the same result, in both libraries, not one library performing a “Soft delete” and the other performing a “hard delete” (if that’s what it’s called) After all, they are on the same drive.

I’m not sure why I keep getting answers regarding how “Automatically Empty Trash” works. My point is , and always has been, that Plex is automatically emptying the trash, and only on one newly created library, when I have explicitly told it not to. LOL - I must be typing with a heavy Canuck accent, eh? :smiley:

@trumpy81 said:
With that option disabled no METADATA is deleted.

I have read your reply. The option is disabled and I do not expect metadata to be deleted.

to summarize…

TV library “Test” completely removes the item from the library when I delete the files associated with a show It no longer appears in the library. There is not a poster. There is no Trash can icon. It does not appear anywhere. I assume that means the metadata has been deleted from the library.

A different library, on the same hard drive, “TV Shows” soft deletes the show when the files are deleted. There is still a poster, there is a trash icon overlaid over the poster, and I can see the information for the show even though it says “unavailable” I am going to assume the metadata is still in the database.

So, two libraries act completely different. Same Hard Drive. Same Server. Same settings.

Am I really wrong in expecting them both to act the same way? Is it the normal and expected behavior for one library to soft delete, and another to completely remove the item? And if it is, how can I force the Test library to act the same way as all of the rest of my libraries?

I strongly feel that I have found a bug, and the bug can be reproduced on my system with the same results when a new TV library is created. Items are automatically removed entirely from the library. A “soft delete” does not occur.

If my understanding of a “soft delete” is correct, items should not be removed from my library when I have “Automatically Remove Trash” disabled. I have seen advice on this forum to make sure you have the options set that way so that items are not removed from your library if you have media that may become unavailable such as a USB drive.

I do not believe that this is the “expected” behavior as replies have indicated. The expected behavior is and should be a “soft delete” That is what happens on older libraries on my system, and I expect all libraries to act in the same manner.

I have attached a PDF with the steps I have taken to reproduce the bug, as well as new logs. I DO expect that if there is a reply, that once again I will be told that this is the expected behavior.