Jump to content

Bug: Latest media date added resets on new metadata


Recommended Posts

Last month (Sept 25) I noticed that a large number (37) of previously added movies had suddenly moved to the top of my "Latest Media" movie queue. The same thing just happened again on October 18, but only to two previously added movies. This seemed to happen with no intervention from me.

 

It appears the metadata "date added" field is being reset whenever a new metadata item is added to the folder. I have verified  in metadata manager that this field has been changed and no longer reflects the date the movie was added but either Sept 25 or Oct 18 2017.

 

In investigatory mode tonight, I have tried doing something similar manually using the Library settings menu, choosing Scan Library on my Movies library, and then selecting Search for Missing Metadata in the dropdown. So far, manually searching for metadata has not caused the same problem with the "date addded" field, though the scan is still in progress. I will update if it does cause the same problem when the scan finishes.

 

Tonight I have also tried changing the Library > Advanced > Date added behavior for new content from "Use data scanned into library" to "Use file creation date." No change in the (now messed up) Latest Media order was observed after reloading the home page, logging in and out of emby, and restarting the server from settings.

 

I am not sure if this last change will only apply to media added from now forward or should apply to my existing movies. When I look at the directory structure of the actual folder using the OS, I can see that file creation date for the folder is the new, same date as the new metadata while of course the file creation date of the actual movie mp4 file is still the date I added the movie. Note that my movies are organized using the standard folder-movie file convention: Movie Name (2000) > Movie Name (2000).mp4 

 

This is frustrating. I usually add a couple of movies a week or so, and we like to pick what to watch from the most recently added list.

 

I'd attach logs but latest problem was a few days ago and logs have cycled. Maybe if I catch it again, now that I know what to look for.

 

Link to post
Share on other sites

Thanks Luke. No TimeLord plugin. No nfo files. I should clarify that I made the change to use file creation date before I started the "search for missing metadata" so maybe that point isn't that useful... it might be resetting it to the correct movie file creation date or leaving it unchanged.

Link to post
Share on other sites

Ok yea something in the refresh action is probably causing the dates to be changed based on your new setting value. I'm not quite sure why but this is just one of those combinations that isn't done very often so there's probably a check missing somewhere.

Link to post
Share on other sites

The "search for missing metadata" appears to have finished. About 85 movies had metadata updates, many more did not. No changes to the "Latest Media" order were observed.

Link to post
Share on other sites

Looking at this carefully again, I realize I misspoke when I said the "date added" field in the metadata had changed to the file creation date for the movie folder on the date new/replacement metadata was found for that movie.

 

I should have said the "date added" for the movie metadata changed to the file modification date of the movie folder. This is the right description of the bug behavior as observed.

 

Maybe something like this could be the cause of the bug too?

Link to post
Share on other sites

We don't use file modification date. I can tell you with certainty that that's not happening because we have several users who would like us to use file modification date, but at present we don't do that.

Link to post
Share on other sites

Well, upon further investigation after sleep I see that in many cases from the 9/25/17 metadata update, the date added is reading 10/17/2017.

 

I am considering backing up the library and refresh dbs manually, changing the libraries to use file creation date AND nfo files, and then deleting the dbs to rebuild the db.

 

CROSSLINKS: If anyone in the future finds this thread, I also found reading these two older threads useful:

 

https://emby.media/community/index.php?/topic/30992-emby-keeps-changing-the-date-added-on-old-movies-in-my-collection-and-now-tells-me-that-theyre-the-most-recently-added/

 

https://emby.media/community/index.php?/topic/36280-emby-and-sonarr-errorsissues/page-2&do=findComment&comment=341855

Link to post
Share on other sites

Except in those cases, they had nfo files and other programs were altering those nfo files and Emby was simply reacting to those changes. That's why I asked if you had nfo files earlier and you might want to double check that.

Link to post
Share on other sites

Previously I had no nfo files. I saw those other threads weren't perfect analogs, but the symptoms are similar in that the date added field was being changed. I'm meticulous about my library at the filesystem level.

 

I did a database backup and then rebuilt the databases using the file creation date option and now with nfo files checked. The library.db file went from nearly 1G to 46M, and things are running much smoother now. Latest media appears to work perfectly again.

 

If you think it would be useful am happy to script a recursive nfo removal tool and try adding my library again. But I think it may have been database problems.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...