Server Version#: 1.20.1.3252
- I had a library full of movies in a folder called “Movies” matched with the old metadata agent.
- I wanted to move my PMS and libraries to another system, which I did following this guide: https://support.plex.tv/articles/201370363-move-an-install-to-another-system/
- In addition to following that article, I also alphabetized my movie files so “Movies/A” “Movies/B” and so on. And so I made some changes to the database and replaced the media_parts and section_locations with “…/Movies/A/A Wonderful Life…”. (I have done this before with great success).
- I restarted PMS, did a scan, emptied trash, played some files, and it all worked.
PROBLEMS STARTED AFTER THIS STEP
5) I then chose to update to the new metadata agent. I “Upgrade Matching” on my library, and then I clicked “Refresh Metadata”.
6) Once it was all done, I did another scan. Everything plays.
7) I used the trash filter to confirm there were some movies that needed Emptying. I clicked “Empty Trash” on the library and it started deleting ALL the metadata.
8) I instantly stopped Plex, and saw 50% of my library was gone.
9) I checked the trash filter and saw 0 items.
10) I clicked “Empty Trash” to confirm the problem, and it started deleting all my metadata yet again.
I can post the full verbose logs needed but it’s just a lot of
Sep 07, 2020 02:03:03.890 [0x7fe90a7fc700] DEBUG - Deleting directory [Gintama (2017)] (65259)
Sep 07, 2020 02:03:03.890 [0x7fe90a7fc700] DEBUG - Deleting media item 528084.
Sep 07, 2020 02:03:03.890 [0x7fe90a7fc700] DEBUG - Was connected to metadata item 417377, count is now 0.
Sep 07, 2020 02:03:03.890 [0x7fe90a7fc700] DEBUG - Destroying metadata item 417377 (Girl)
Sep 07, 2020 02:03:03.891 [0x7fe90a7fc700] DEBUG - Deleting media item 820832.
Sep 07, 2020 02:03:03.891 [0x7fe90a7fc700] DEBUG - Was connected to metadata item 576806, count is now 1.
Sep 07, 2020 02:03:03.891 [0x7fe90a7fc700] DEBUG - Updating deletion state for metadata item 576806, is has a dead item count of 0.
Sep 07, 2020 02:03:03.891 [0x7fe90a7fc700] DEBUG - Deleting media item 820833.
Sep 07, 2020 02:03:03.891 [0x7fe90a7fc700] DEBUG - Was connected to metadata item 576806, count is now 0.
Sep 07, 2020 02:03:03.891 [0x7fe90a7fc700] DEBUG - Destroying metadata item 576806 (Girl)
Sep 07, 2020 02:03:03.892 [0x7fe90a7fc700] DEBUG - Deleting media item 820834.
Sep 07, 2020 02:03:03.892 [0x7fe90a7fc700] DEBUG - Was connected to metadata item 576807, count is now 2.
Sep 07, 2020 02:03:03.892 [0x7fe90a7fc700] DEBUG - Updating deletion state for metadata item 576807, is has a dead item count of 0.
Sep 07, 2020 02:03:03.892 [0x7fe90a7fc700] DEBUG - Deleting media item 820835.
Sep 07, 2020 02:03:03.893 [0x7fe90a7fc700] DEBUG - Was connected to metadata item 576807, count is now 1.
Sep 07, 2020 02:03:03.893 [0x7fe90a7fc700] DEBUG - Updating deletion state for metadata item 576807, is has a dead item count of 0.
Sep 07, 2020 02:03:03.893 [0x7fe90a7fc700] DEBUG - Deleting media item 820836.
Sep 07, 2020 02:03:03.893 [0x7fe90a7fc700] DEBUG - Was connected to metadata item 576807, count is now 0.
Sep 07, 2020 02:03:03.893 [0x7fe90a7fc700] DEBUG - Destroying metadata item 576807 (Girl: This Is Amazing)
Sep 07, 2020 02:03:03.894 [0x7fe90a7fc700] VERBOSE - BPQ: onLibrarySectionChanged for library section 16: ItemsDeleted
Sep 07, 2020 02:03:03.894 [0x7fe90a7fc700] VERBOSE - BPQ: onLibraryChanged callback already scheduled at 2020-09-07 02:03:03
Sep 07, 2020 02:03:03.895 [0x7fe90a7fc700] DEBUG - Deleting directory [Girl (1998)] (65260)
Sep 07, 2020 02:03:03.934 [0x7fe90a7fc700] DEBUG - Deleting media item 528088.
Sep 07, 2020 02:03:03.935 [0x7fe90a7fc700] DEBUG - Was connected to metadata item 417379, count is now 0.
Sep 07, 2020 02:03:03.935 [0x7fe90a7fc700] DEBUG - Destroying metadata item 417379 (Girl)
Sep 07, 2020 02:03:03.936 [0x7fe90a7fc700] VERBOSE - BPQ: onLibrarySectionChanged for library section 16: ItemsDeleted
Sep 07, 2020 02:03:03.936 [0x7fe90a7fc700] VERBOSE - BPQ: onLibraryChanged callback already scheduled at 2020-09-07 02:03:03
I have no idea if the new metadata agent is at fault here, but I’ve done the same restore and move before with no issues. What did I do wrong here?
What is the correct way of changing filepaths en masse so they aren’t deleted with the new agent?

