PMS Version 1.12.3.4973 won't empty trash?

I have two shows that show the trash can icon on them due to files recently being replaced. Emptying the trash, optimizing, cleaning bundles, etc. will not get rid of the trash icon. When I browse the shows, there is no file in there that shows a trash icon, only the main show icon does. For the sake of troubleshooting, I’ll just focus on one show for now.

What is going on?

Here you can see a screenshot of the trash icon - along with all of the episodes in the folder (notice none of them have a trash icon.)

Even with verbose logging I don’t see any errors:

Apr 29, 2018 12:31:51.996 [7504] DEBUG - Request: [192.168.1.205:59109 (Subnet)] PUT /library/sections/2/emptyTrash (10 live) TLS GZIP Signed-in Token ()
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * Host => 192-168-1-17…plex.direct:32400
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * Connection => keep-alive
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * Content-Length => 0
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * Accept => text/plain, /; q=0.01
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * Origin => http://192.168.1.17:32400
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * Accept-Language => en
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * User-Agent => Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * Referer => http://192.168.1.17:32400/web/index.html
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * Accept-Encoding => gzip, deflate, br
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Client-Identifier =>
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Device => Windows
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Device-Name => Chrome
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Device-Screen-Resolution => 1920x972,1920x1080
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Platform => Chrome
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Platform-Version => 66.0
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Product => Plex Web
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Provider-Version => 1.2
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Sync-Version => 2
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Token => xxxxxxxxxxxxxxxxxxxx
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Version => 3.41.2
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Product => Plex Web
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Version => 3.41.2
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Client-Identifier =>
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Platform => Chrome
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Platform-Version => 66.0
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Sync-Version => 2
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Device => Windows
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Device-Name => Chrome
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Device-Screen-Resolution => 1920x972,1920x1080
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Token => xxxxxxxxxxxxxxxxxxxx
Apr 29, 2018 12:31:51.996 [7504] VERBOSE - * X-Plex-Provider-Version => 1.2
Apr 29, 2018 12:31:52.012 [7504] DEBUG - About to destroy 0 deleted items.
Apr 29, 2018 12:31:52.012 [7504] DEBUG - About to destroy 0 deleted directories.

Apr 29, 2018 12:31:52.028 [2080] DEBUG - Completed: [192.168.1.205:59109] 200 PUT /library/sections/2/emptyTrash (10 live) TLS GZIP 26ms 268 bytes (pipelined: 3)**
Apr 29, 2018 12:31:54.960 [2080] VERBOSE - Comparing request from 192.168.1.205 against 192.168.3.0/255.255.255.0
Apr 29, 2018 12:31:54.960 [2072] VERBOSE - Comparing request from 192.168.1.205 against 192.168.3.0/255.255.255.0

  1. Verbose logging is of little use in general diagnosing of problems. It is only of help if we need dig deeper into a particular step.
  2. The trash can being shown means the media has been flagged as “Not Available”. This happens when a directory higher has been removed:

Consider:

If I have: /nas/movies/4k/Avatar (2009)
and remove: 4k and all below it

I will see Avatar (2009) shown as unavailable.

Why does this happen ?

PMS is sensitive to USB and NAS media.

If the top-most or next directory down disappears, it marks the items as “Unavailable” instead of hard-deleting everything.
This way, when plugged in / connected, the trash can is removed and available again.

To clear this for you: Look at the path shown when you click Get Info. Find out what’s missing and recreate those upper-level directories. Once PMS can look and see only the movies is gone but the rest remain, it will remove the movie

@ChuckPA there is nothing unavailable or missing and everything in that folder plays without issue.

click Scan files again or click “Analyze” for the specific item.

After you do this, if still not corrected, please attach the log files for me to examine

@ChuckPA Analyze nor scans fix it. Also you mention “Analyze for the specific item” but as I mentioned in my OP and in the original screenshots, there is no trash icon on an individual item under the tv folder that DOES have the trash icon.

Regardless, doing an analyze on the root season folder did not fix it. Here are the logs: (there are two shows in question, but let’s just focus on Death Note - to help you grep in the logs.)

http://1dl.us/plex/

One thing I’m seeing which will really muck up the works is the state of your database. It’s super fragmented. (needs optimizing).

Apr 17, 2018 16:34:43.167 [4624] ERROR - QueryParser: Invalid field 'sectionID' found, ignoring.
Apr 17, 2018 17:01:45.866 [4428] WARN - SLOW QUERY: It took 234.001495 ms to retrieve 50 items.
Apr 17, 2018 18:00:56.214 [0744] WARN - SLOW QUERY: It took 234.001495 ms to retrieve 50 items.
Apr 17, 2018 18:23:14.088 [2216] WARN - SLOW QUERY: It took 218.401398 ms to retrieve 50 items.
Apr 17, 2018 18:45:52.258 [4336] WARN - SLOW QUERY: It took 234.001495 ms to retrieve 50 items.
Apr 17, 2018 18:45:55.346 [3572] ERROR - QueryParser: Invalid field 'sectionID' found, ignoring.

These should take less than 5 milliseconds to retrieve, not 200+

Hover over Libraries, expose the ellipsis, click Optimize Database.
Restart PMS
Let’s see how that changes the behavior (which it will )

@fdasjf234342

I got hit with this as well recently. I think it’s a change in a recent PMS version. It is because you have a monitored path or folder which no longer exists and because of that, PMS will not empty the trash. I think it’s a safety precaution in case a hard drive dies without you noticing which is nice.

Try looking over your monitored folders in the affected library settings and remove the paths which you no longer use and then it should work.

@ChuckPA I optimize the DB at least once a week. (optimize db once a week is checked.) I just did it again for you. My guess is there is another issue, or the optimize command is not running (like the empty trash command isn’t apparently.) I optimized, and bounced the Plex server. Trash icon is still there.

@d2freak there is no monitored path or folder which now doesn’t exist. This directory structure hasn’t changed in over 3 years. Like I said, the entire show plays fine through Plex. See images that all folders and files exist and everything is accessible. Yet Plex still says “nope!” https://imgur.com/a/nqg63J4

Does anyone have any other ideas? Is there a better way to submit this bug to Plex?

@ChuckPA any ideas on how to fix this issue? Is there anyone else that can help me get this resolved?

@fdasjf234342 said:
@ChuckPA I optimize the DB at least once a week. (optimize db once a week is checked.) I just did it again for you. My guess is there is another issue, or the optimize command is not running (like the empty trash command isn’t apparently.) I optimized, and bounced the Plex server. Trash icon is still there.

@d2freak there is no monitored path or folder which now doesn’t exist. This directory structure hasn’t changed in over 3 years. Like I said, the entire show plays fine through Plex. See images that all folders and files exist and everything is accessible. Yet Plex still says “nope!” https://imgur.com/a/nqg63J4

Sorry for the delay in responding.

The trash can is the ‘Unavailable’ symbol.

If all the other files in that same folder/directory are playable, Check the permissions. “Unavailable” is shown when a. One of the parent directories are missing (like when a USB gets unplugged) or B. (likely) user plex doesn’t have permission to read it

Have you tried taking the whole Series out (moved to a non-monitored location) and done the full Plex Dance?

  1. Move out
  2. Scan files
  3. Empty Trash
  4. Clean Bundles
  5. Verify it’s all gone
  6. Move Back
  7. Scan again is-if new

There is nothing unavailable in the directory. Nothing has changed in years.

I’m sure the “plex dance” will fix it, I just figured Plex would be more interested in fixing this bug to prevent future “plex dances” from their customers.

I guess I’ll just delete and re-add. Was hoping to provide information to allow the plex dev’s to fix this annoying issue instead of having people just “start over.” Seems silly to me as a band-aid.

Thanks but Engineering is well aware of it and already on the task.
The correction requires a large amount of the matching software be rewritten. This is currently being done.
I don’t have a time frame on its completion because not only is this software being redone but also the entire metadata lookup software as well. From the functional perspective, the “scanner” as we know it is being overhauled from the ground up.
For now, I can only suggest you perform the dance. If you’re good with SQL, you can go into the database and flip the availability flags yourself using the metadata item ID you see in the XML.

@ChuckPA said:
For now, I can only suggest you perform the dance. If you’re good with SQL, you can go into the database and flip the availability flags yourself using the metadata item ID you see in the XML.

Okay, would downgrading to a lesser version not fixed the issue? Then upgrade when a fix version does come available…

No, it makes no difference at this point because the entries are in the database. The Plex Dance is what removes them from the database so they can be added back cleanly.

@ChuckPA said:
No, it makes no difference at this point because the entries are in the database. The Plex Dance is what removes them from the database so they can be added back cleanly.

Oh, that does suck.

Yeah, it does.
I wish I were allowed to share what I know on the work to be done. If allowed one word I can share? “NICE” :slight_smile:

@ChuckPA said:
I wish I were allowed to share what I know on the work to be done. If allowed one word I can share? “NICE” :slight_smile:

OHH! You’re in trouble!!! lol…

Says who? You? :smiley: lol