Removing Unavailable Media

Server Version#: 1.41.8.9834
Player Version#: N/A

This has been going on for many, many months, maybe over a year.

I frequently replace media files with better version (better codec, embedded subtitles, better resolution, etc…).

In the past, when replacing the media on the file system, i would then scan the libraries and the new media would be scanned and the old media is removed from the database.

Now, when i do that, a lot of the times, it will add the new file but keep the reference to the old file so when i do a Get Info, i would see both old and new files but the old file is marked as Unavailable. Although annoying, at least the item can be played.

When i outright delete the whole movie, it will, many times, keep the item and have the single file be unavailable. It should completely remove all references to the movie so that it doesn’t show when browsing or searching.

The most frustrating part is that it will completely remove it from 1 or 2 servers but keep it on the 3rd server. They are configured exactly the same and running the same versions, with the same metadata agents.

Finally, i at least need a way of finding all the media with a file Unavailable so i can at least manually delete them. I have a huge library so filtering on that is crucial. I cannot figure out how to do this. I have tried using WebTools but that just tells me ALL media is missing.

  1. ensure that the database is in good health: DBRepair/Windows at master · ChuckPa/DBRepair · GitHub
  2. Edit the Plex library in question. Go to the “Add Folders” tab. If there’s more than one folder path listed there, ensure that ALL of them are a) existent, b) accessible c) not completely empty
  3. When replacing fiiles, and keeping the previous file name, trigger “Analyze” on the item.
  4. When adding a new (quality) version of an existing item and using a different file name: a) Scan Library Files, b) remove old version, c) Scan Library Files again, d) Empty Trash

For step 4, this would maybe work when replacing 1 or 2 movies but i usually replace 50 to 200 movies at a time and they will all have a different filename because the names of the movies are like:

Movie (Year)-H264-720p-AAC-WEB-DL.mkv

and might change to

Movie (Year)-H265-1080p-EAC3-WEB-DL.mkv

I guess i’ll take a look at the DBRepair script

Also sounds like you don’t have the option enabled to automatically empty the trash. This is what clears out the old files from the database.

It may SOUND like that but it’s not the case. I am 53 year old IT Director who’s held every IT job since i was 17 years old. I first created my account on here in 2014 so i am not new to Plex

Ok, then it’s very likely 1 or 2 from OttoKerners comment above. The only reason a file that doesn’t exist would still show up is if your db is damaged so the entry can’t be removed, or it’s setting an empty folder then it doesn’t remove the reference.

Can you replace a file, run a scan, then post the logs. This should indicate why the old entry isn’t being removed.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.