Hi, there seems to be an issue with removing the last item in a library, it leaves the entry (thumbnail, meta, possibly in the DB) but with no file associated.
This is intended behaviour.
If Plex cannot find any file (literally any file, it doesn’t have to be a media file), it assumes that the media storage is temporarily not available (server down, cable unplugged etc.) and won’t change anything.
Why don’t you erase the library?
Another workaround is to put a small text file into the folder.
Fair enough, but when its the last item in the library, shouldn’t behavior be to remove/hide that last entry? The “risk” is one item and I do understand if more than one file has been “suddenly” unavailable but it seems like the logic should be “if <= 1 then empty”.
Because if another file is moved into the library the “old one” get removed. It’s only there as a ghost until something else has been added to the library.
The reason for not removing the library is that new files are added to it, watched, verified, fixed (if necessary) and then moved to the archive library.
Don’t forget that Plex is running on a plethora of OS’es and there are several ways of mounting folders/drives/shares on each. Some ways for “checking the presence of a folder” are not available on every OS (or may not work with all file systems/ways of mounting them).
The way it is is the most practical method of them all.
Plus your use case of a completely empty library is an edge case, IMHO.
But wait, if the reason for this behavior is that Plex shouldn’t touch the library if the storage goes temporarily offline. How come it doesn’t care about this when multiple storage locations are added to one library and one of those storage locations goes offline? Why would the desired behavior be that PMS removes entry 100,99,98…all the way down to 2 but not the last one because “then something must be wrong”?