Plex "Empty Trash" wipes ALL library metadata with new Plex Movie agent

Ugh, do you have a database backup handy?

Why in #3 did you modify the database directly instead of letting the scanner find your media? (Not saying you did anything wrong, just curious. I can think of plenty of reasons - Faster to do an update ... than a scan, etc.)

After the scan in #6 I would have been feeling comfortable too.

Why in #7(a) was there anything in the trash? Per your comments you had emptied the trash in #4.

#8 Ugh! I feel for you.

If you have a backup it would be interesting to look at some of the examples that were deleted.

I’d like to understand this for myself in the future, too.

I’ve never hacked at section_locations myself. Assuming your locations were accessible, I don’t see any immediate issues.

I’ve been curious about how media_parts.hash and media_parts.directory_id are calculated and used. I wonder if those are connected to your issue.

I believe that hash includes file size and a partial contents hash; I’m unclear if it includes anything else. Did you change the storage filesystem or network sharing protocol?


I’ve recently experienced what seems like the opposite issue. My issue doesn’t seem to be related to the new agent (it also applies to TV shows) but it did start at the same time. I had media “Emptied” during a scan, although I didn’t say “Empty Trash”.

Change in 'Trash' Behavior - unexpected library item removal - #8 by pshanew