Server Version#: 1.42.1.10060 same problem whether I use linuxserver/plex:latest or plexinc/pms-docker:latest (running on Synology)
Player Version#: N/A though view it through the Web interface & Roku interface
In the last month a specific episode of a show (e.g. Show S04E19) has started appearing in the recently added list even though the file was added around 2011. Only this specific episode keeps popping up in the recently added list
Things I have tried to resolve the issue:
Checked the modified date –> it is 2011
Moved the file out, plex dance , move it back in –> still shows up in recently added and (I think daily) it moves back to the front of the queue
Moved the file out, touch in linux file to update date, plex dance , move it back in –> shows in recently added (as expected) but then (daily) keeps going to the top of the recently added list
Deleted the old low quality file and got a new recording in higher quality (i.e. different codec) and format (from avi to mkv), added via sonarr in the library (i.e. modified date changed to original aired date by sonarr), did the plex dance whenever appropriate in the process –> show in recently added and daily pops back up to the top of the recently added
Delete the entire show, plex dance , replace every file with a new & different version, plex dance –> I now have all 5 seasons of the show in recently added [thought great job done], wake up and now S4E19 is back again to the top of the list [i.e. I see S4E19 and next to it Show 5 seasons as recently added]
Tried using ChuckPa DBRepair tool in between some of the above actions but the outcome did not change
Tried changing the date via python script (using Claude) which I do not know if it actually worked or not but still no changes
from plexapi.server import PlexServer
from datetime import datetime
# import csv
plex = PlexServer('http://192.xxx.xxx.xxx:xxx', 'token')
TEST_MODE = False
# Specify your exact show name as it appears in Plex
SHOW_NAME = 'SHOW' # Use the exact name from your Plex library
SEASON_NUM = 4
EPISODE_NUM = 19
# Get the show
show = plex.library.section('TVLibrary').get(SHOW_NAME)
# Get the specific episode
episode = show.episode(season=SEASON_NUM, episode=EPISODE_NUM)
# Change the date
new_date = datetime(2011, 7, 11)
# Print Changes
print(f"Show: {episode.grandparentTitle}")
print(f"Episode: S{episode.parentIndex:02d}E{episode.index:02d} - {episode.title}")
print(f"Current date: {episode.addedAt}")
if TEST_MODE:
print(f"Would change to: {new_date}")
else:
episode.edit(addedAt=new_date)
print(f"✓ Changed date for {episode.title}")
Not quite sure what else to try to resolve the problem - I am hoping it is not due to a hard-drive dying but if that’s the case will take clues on how to figure that one out
I have had that option always enabled - not clear why only in the last few weeks and with a specific episode the issue has appeared. Is it just random chance as far as you are aware?
Will I be able to re-enable it eventually? Asking as I (reasonbly) often change my media so I do need to clear the trash - maybe not daily but at the very least weekly
It’s always been critical to activate, if media storage is NOT within the same physical device as the Plex server. Or are you using a Docker container within your Syno?
Are you allowing the Syno to spin down the hard drive, when it’s idle?
If yes, chances are that the first (or the first few) requests from PMS will return no data, as the drive doesn’t spin up fast enough when accessed. This in turn can be interpreted by PMS as “this file is no longer present”. Which then gets marked as deleted. With the above mentioned check box activated, the item is then immediately ousted from the library.
Upon the next library scan (and the hard drive already spun up) the file is found again and added to the library “as new”.
Thanks - this looked like a promising avenue but does not seem to actually be the answer
I do let the HD spin down but below why I believe it’s not the answer
Woke up and checked my plex status after having disabled the “Empty trash automatically after every scan” setting:
The problematic episode had not moved
I had new episodes loaded that were also not available (e.g. having upgraded from x264 to AV1) –> requiring an empting of the trash manually which I did not do at that point of time
I had new episodes that were in the wrong format so got the correct format to add them to Plex
HD are fully spinning as actively used
I ran a scan for new files for TV
New episodes appear in the right order (problematic episode still in the right location)
Emptied trash
Problematic episode is back at the very beginning of the recently added list
Also -by happenstance- I have moved around a number of my music around which means Plex has been running Sonic Analysis non stop since last weekend so in reality the HD have likely never gone to sleep in the last few days
The only tools that I use to handle my TV shows are: sonarr and/or ssh in Synology and mv commands
The media originally for the specific episode in question was xvid in avi container (same as for the other episodes in this specific series) from several years ago and never touched. Since the problem has appeared the media (including the troublesome episode) has been upgraded to x265 in mkv container.
If I move this specific episode out (S04E19) from Plex and keep it out no other episode gets moved to the top of the “Recently Added” list
I did not make any changes to the metadata agent - I have had the same set-up untouched (beyond nightly updates to the dockers for plex and sonarr) for several years
I have used the ChuckPa/DBRepair tool a few times in between changes (actions described in my first post). I have always used the Automatic option - if another selection would be better happy to try it
I was not aware of the DB bloat issue - will read that post and see if there are actions for me to take
Thank you again for your help in diagnosing the issue and possible solutions
EDIT: tried to use the DBDeflate script but whether I run it within the docker, whether I run it externally, whether I copy externally the Plex SQLite, whether I refer to the library database within the docker or outside I always end up with one error message or another so at the moment I have given up getting that script to run on the database. However my library.db is less than 1 GB so not that big
A brief update: I have removed the problematic episode from Plex (i.e. moved S04E19 completely out of Plex path) and Plex behaves exactly as expected (whether empty trash is enabled or not) i.e. only recently added episodes appear in recently added and they appear in the right order
One thing I have noticed is that for Sonic Analysis it had gone down to 90 album and then next time I checked it had jumped up to 2000+ album (probably unrelated to anything)
Will keep S04E19 out for a few more days to see if any other “old” episode appears in the recently added. If everything is working as expected for longer I will then try to put it back into its folder and see what happens
So far with/without empty trash enabled I have had no issue with old episodes appearing in the recently added section.
Today I have added back by “mv’ the problematic S04E19 in its correct location within the Plex structure. Before moving it I have “touch” it to ensure the file date reflected the date I moved it back. Currently sitting as the most recently added episode in the recently added (as expected).
Will wait and see if eventually it moves down the list or if it goes back to popping back up as the most recently added episode
And now that I have had the troublesome S04E19 episode back into Plex every day during the daily library update (I update once every 24h automatically) the episode goes back to be the first in the recently added list
As the problem was sudden, it is not linked to the actual file (as I have changed the episode), when that episode is not included no other episode becomes troublesome, it seems to have to do with some Plex internal database issue rather than something to do with when the update occurs and whether the HD are accessible or not
And, in the same way it suddenly appeared, the problem seems to ahve resolved itself
As of two days ago S04E19 has stopped moving to the top of the recently added list (regardless of whether Empty trash automatically after every scan is enabled or not)
No idea why it has stopped but it has (for the moment)