2 "recently added" items stuck

For about a month I have two items stuck in the recently added list.
After these two items the list updates like usual if I add content to the server, but the first two item never change.

Any hint how to get rid off this?

(This has to be a server issue since this happens on every device)

Yes, the recently added information is on the server. Can you call up the xml for these 2 items? In there you will find a field for ā€œaddedAt=ā€ and a long number. Can you post the numbers for these 2 items? That is the time the item was added to the database in Unix time. If that is somehow set to a time in the future, they will stay there until that time passes and you add more stuff after. If this is the case, you will need to remove and readd the items so a new date can be used.

Thanks,

readding the files helped!

same problem here with 3 series sesons that wont dissaper in recently added.
cam someone tell me where I can find the .xml data

Changing the xml file will not help. These are actually generated based on what is in the database. You can view the xml by using Plex Web and going to one of the episodes in the season, along the left, hit the 3 dots, then info. A pop up window will appear, hit the view xml at the bottom. This is just to verify that the added_at date is indeed sometime in the future, which is why the items are stuck. That date hasn’t happened so it will always be listed first until that date finally passes and yo have more items after that date.

The less technical fix is to remove and readd (Plex Dance) all the episodes from these seasons. The technical approach is to fix the entries in the database.

1 Like

@MovieFan.Plex said:

The less technical fix is to remove and readd (Plex Dance) all the episodes from these seasons. The technical approach is to fix the entries in the database.

That worked (only needed first Episode of the season)
Thank you very much :wink:

I had same issue with 2 episodes stuck in the ā€œrecently addedā€ and won’t budge not matter what.
I was able to solve the issue using @MovieFan.Plex post.

I opened the XML and found out the values for those 2 episodes were somewhere in 2038. As much as I have patience, but waiting 22 years is unacceptable. So I took matters into hands and started digging.

Here are the instructions to repair those items manually.

  • Find the location of your Plex server sqlite database. On linux it’s something like that: /Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db
  • Install an Sqlite management tool and open the database file with it. I used sqlite3 on linux.
  • Open the XML info of the corrupted item in Plex Web (Open ā€œInfoā€ for the episode and click ā€œView XMLā€).
  • Locate the property ā€œratingKeyā€. This will be the id of the record in the metadata_items table.
  • Run the following command in Sqlite (replace [ratingKey] with actual value from last step):

UPDATE metadate_items
SET added_at = created_at
WHERE id=
[ratingKey]

Done!

I hope this was helpful.

3 Likes

As a followup to @n_shay 's very helpful post… if you have a lot of items that need fixing, you can do the following. Standard disclaimer applies - I know a lot of SQL from my day job, but not as experienced with SQLLite. Backup your db, and use at your own risk.

– This will give you all of the rows of items containing an added_at date that is greater than right now. I use this to get a rowcount of how many incorrect add dates I have in my db.

select * from metadata_items where added_at >= date(ā€˜now’)

– To fix them we are going to do just as before and set the added_at date = to created_at, but instead of running a command for each record (I had several hundred)… we are going to do them all in one swoop. This looks at all the records in the metadata_items table, and if the added_at date is after right now, then it sets added_at equal to created_at.

update metadata_items
set added_at = created_at
where added_at >= date(ā€˜now’)

Interesting fact, my weird added_at dates were also 2038. Is it possible that there is a condition that will trigger Plex to auto fill in a date like that? I’ve seen some weird bugs during row creation when using XML or metadata sources in SQL. Maybe its a check that needs to be made on the import side of Plex? I looked at the raw file metadata prior to import, and couldn’t see a 2038 date in there anywhere, so I’m assuming it isn’t a problem with a rip/file. I’d be happy to take a look at the import process if somebody at Plex wanted me to.

2 Likes

The time stored in the database is based on linux epoch time which runs out in 2038. If you are seeing 2038, then the Plex scanner probably ran into an overflow value for the date so it stopped at 2038. If you have a way to reliably recreate 2038 showing up, I’d love to know so we can work around it.

That fixed me!

I have the same problem, and i just noticed that all my stuck item where in a folder whose name included the french letter ā€œĆ©ā€ on my NAS. Currently refreshing metadata after folder name editing. Guess I’d have to add new content to validate… which will not happen soon. Can someone replicate?

2 Likes

Hey guys, I know this is an old post but I’m having the same issue. Tried checking the XML and so far the first 3 season of 24…seem to be correct. Many of them showing 1291042355 added around 2010…so the dates so far seem to be correct. Do I need to go through the xml for each episode to find the culprit? There are over 120 episodes so didnt really want to do that.

If you run the SQL command that @isujinx provided it should fix the issue for all corrupted entries:

update metadata_items
set added_at = created_at
where added_at >= date(ā€˜now’)

I never ran into this issue ever again, and had only 2 of them so it was easy running it against their ID.

1 Like

Mine worked only this way.

update metadata_items set added_at = added_at>=date(ā€˜1539539786’) where id=XXXXX;
date added comes from one of those 5 movies stuck there for months.

Thanks @n_shay @isujinx
:slight_smile:

Edit: after refresh they came back, when the last update ended they’re gone again. I hope it stays that way

Edit 5/11/2018
Seems that 6 now of my movies are ā€œpinnedā€ in recently added. Is there anyone found a proper solution? Thanks again :slight_smile:

Could someone explain this is simpler terms. I can install sqlite, I can open the file (in my case in :/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases) which is I assume ā€œcom.plexapp.plugins.library.dbā€ ??

select * from metadata_items where added_at >= date(ā€˜now’) shows me …>
…> and sits doing nothing so I enter the rest (one cut/paste or is it 3 commands with CR after each). And nothing except …>

If this is a known problem which it seems to be, I am surprised Devs haven’t fixed or at least got it documented. I mean any entry in the future has to be in error no???

You forgot the semicolon at the end of the command. sqlite3 lets you execute multiline statement and won’t execute it until you enter semicolon.

Try pasting this command and hitting CR:

select id, title, added_at, created_at from metadata_items where added_at >= date('now');

BTW, if you want to get people’s attention without PMing, try tagging them like this @Methanoid .

2 Likes

I can confirm that Plex keeps anything with an accent e.g. ā€œY Tu MamĆ” TambiĆ©nā€ on the recently added movie list daily. For example this movie the added_at date gets updated daily.

Same for
Les MisƩrables
PokƩmon Detective Pikachu

Can we get this fixed please or provide a way to update it back to when it was created and not be updated daily?

I followed all the linux commands to remove roughly 10 recently added items and it doesn’t appear to be working. I’ve even gone as far as to completely uninstall Plex and reinstall only to find that everything is in the same place. Usually I would be happy about this, but now when things are broken. Also, I would like to know exactly where the database that’s currently be used is actually located. I have a folder labeled ā€œlibraryā€ where I could follow the path given in the instructions above, but looking over the dates of those files, they haven’t been updated since my install/uninstall/linux cmdlet attemps ect. I’ve looked through all the various areas to try to identify the exact location of the database file in question, and have yet to positively identify where this culprit is. Any help would be appreciated. I’m using a synology.

Sincerely,

Your fellow Plex Brethren

I’ve had this problem happen after the latest serverupdate, never had any issues before. Now some of the TV-series and movies have an addedAt date = 31.des 2097 (epoch: 4039369200). A friend of mine has also experienced this after the latest release, is this issue being looked into?

I’ve had this problem too with a few of my movies and discovered that the problem, at least for me, is that the ā€œModified Dateā€ of the file is years in the future. I tried everything, updated the added_at date in the sql db but it would always return to this future date.

It wasn’t until I modified the ā€œModified Dateā€ of the file itself and re-added to Plex would it finally get ā€œunstuckā€.

To modify the ā€œDate Modifiedā€ date on mac os:

touch -mt YYYYMMDDhhmm filename

2 Likes