Plex is not correctly handling files that have better versions added.

In the last couple of weeks I have noticed that Plex marks as Unavailable any show which had an upgraded quality added after Plex indexed it.

For example.

Show 1 Episode 1 is added in SD format.
Works fine with Plex.
1 Day later the HD version of the file is added and the SD is deleted.
Plex now lists both the SD and the HD file and seems to make the now deleted SD file the default one to play and so marks the episode unavailable.

However if you manually pick the version to play you can pick the correct file and it works (except Chromecast).

I have to manually go in and delete the ghost file from Plex.

This never used to happen, I would guess it’s been since the last update, but I am not sure.

Any ideas on how I can fix this?

I don’t think it was ever supposed to operate like that. I believe if you follow the naming convention and add the higher quality movie and do a library update, then remove the lower quality movie and do another library update, things will work as expected.

https://support.plex.tv/hc/en-us/articles/200381043-Multi-Version-Movies

It’s always worked fine before. Regardless should Plex not automatically remove library items that no longer exist? I have it set to update automatically and to empty the trash after every scan.

No it should not automatically remove missing files from the database. What would happen if a network share was offline and the scanner marked everything as missing? Files on a disc that are missing: yes

Unless the files have different extensions then you technically aren’t following the proper naming conventions. For example:
/Movies/Top Gun (1986)/Top Gun (1986).mp4

You’re probably running into problems because your not following the proper naming conventions or using a tool such as FileBot.