Server Version#: 1.30.0.6486
Player Version#: Edge browers
I have my Sonarr system placing files in to my library.
If a new file with a different quality is added to the directory, Sonarr deletes the old file so I only have one copy.
PMS is notified of the new file and happily updates the library to show the new file, but it does not remove the old file that has been deleted.
I have empty trash set to on and I have manually tried to empty the trash but it does not remove the missing library entries.
Among the list of folders which are connected to your library, there is probably one which is either
completely empty
inaccessible
invalid / not existent
This will cause the “Empty Trash” command to be ignored. It is a safety feature, which avoids you losing your library when media storage is temporarily unavailable.
Another possible reason can be a damaged database:
Or inspect them yourself. Take a look at the Plex Media Server.log file and seek for messages about database corrupt or malformed.
If you find these, you may have to repair your database. https://support.plex.tv/articles/repair-a-corrupted-database/
I did as you suggested, nothing in the logfiles with any type of database errors, the only thing I did see was the following entries when I tried to empty the trash.
I have 100’s of directories so going around and finding if any are empty is all but an impossible job.
Jan 03, 2023 11:20:38.618 [5424] INFO - Request: [127.0.0.1:57671 (Loopback)] PUT /library/sections/2/emptyTrash (6 live) #59b GZIP Signed-in Token (ksjLibrary) (Microsoft Edge)
Jan 03, 2023 11:20:38.684 [5424] DEBUG - [Req#59b] About to destroy 0 deleted items.
Jan 03, 2023 11:20:38.687 [5424] DEBUG - [Req#59b] About to destroy 0 deleted directories.
Jan 03, 2023 11:20:38.688 [2724] INFO - Completed: [127.0.0.1:57671] 200 PUT /library/sections/2/emptyTrash (6 live) GZIP 69ms 323 bytes (pipelined: 9)
Jan 03, 2023 11:20:46.229 [5424] DEBUG - [Req#583] [PlexRelay] Transferred: sent 18968, received 5012 bytes, in 325.1 seconds
Jan 03, 2023 11:20:46.258 [5424] DEBUG - [Req#5b2] [PlexRelay] Bytes per second: sent 58.3, received 15.4
Jan 03, 2023 11:20:46.262 [10652] DEBUG - Jobs: ‘C:\Program Files\Plex\Plex Media Server\Plex Relay.exe’ exit code for process 21212 is 255 (failure)
Jan 03, 2023 11:20:53.764 [5424] DEBUG - [Req#5b7] [PlexRelay] Transferred: sent 12988, received 4144 bytes, in 332.6 seconds
Jan 03, 2023 11:20:53.780 [5424] DEBUG - [Req#5be] [PlexRelay] Bytes per second: sent 39.0, received 12.5
Jan 03, 2023 11:20:53.786 [10652] DEBUG - Jobs: ‘C:\Program Files\Plex\Plex Media Server\Plex Relay.exe’ exit code for process 21224 is 255 (failure)
I have a couple of NAS drives with a SMB share each, withing these shares “\TV1\Videos” for example I then have directories for each TV program. I dont have folders per series, just one per program.
That is the correct naming schema. What OttoKerner was referring to is if in your library configuration you had something like \TV1\Vidoes where the directory doesnt exist. If you have a couple of empty show folders that isnt going to be an issue. The problem most often happens when there is an empty root path defined.
Just as a side note to this, I am finding that when library entries exist and the file is missing, my Plex player installed on my TV always tries to play the missing file.
Also, if I have a season of a TV show for download, the download just seems to freeze when it gets to the missing file when using my iPad.