Jump to content

Maintaining 'Date Added' when files are updated


Go to solution Solved by ebr,

Recommended Posts

Posted

My understanding is that at the moment there are 4 ways which a file can have its 'Date Added' field generated:

- Imported from a metadata file included with the file

- From the Date Created field on the file

- From the date and time when it is scanned

- Modified via the Time Lord plugins

 

This has limitations in cases where a system like Sonarr or Radarr updates a movie or episode because there is normally not a date added field in their metadata files, the date created field will be new, in most cases the file name is different so the date scanned would be new.

 

My ideal use-case would be that there is a way of tracking when a movie or episode is initially added to the library i.e. if two weeks ago I added a movie and then updated it today, the 'Date added' field would remain two weeks ago. The use of 'date modified' which is normally changed by Sonarr/Radarr to the release date (or use of Time Lord) does not solve this problem because I would still want a movie premiered/released years ago to appear in the list two weeks ago.

 

Is there a way to make this work on the Emby side or would it have to be done in Sonarr/Radarr?

 

 

Posted

Hi.  I'm not sure I completely followed all of that... but, if something external is putting a specific date into an nfo file for your item then that date is going to be used because that's what that is for - to be able to specify explicitly.

 

Otherwise, using the date scanned into library may be what you want - assuming your "changes" aren't changing the name or location of the file.

Posted

My main problem is that the file name changes based on the video quality, the external nfo does not contain a date added field, only file information and a date premiered.

 

If I forced the file name to remain the same when the file is changed, would the file being deleted then replaced cause Emby to view that as a new file or the same one? The gap would be around 30 seconds.

  • Solution
Posted

If I forced the file name to remain the same when the file is changed, would the file being deleted then replaced cause Emby to view that as a new file or the same one? The gap would be around 30 seconds.

 

That should work.

 

Or, get a date into the nfo file and that will take priority.

  • Like 1
Posted

I will give that a shot, the nfo approach would probably require me changing code where I shouldn't so I'll avoid that.

  • 11 months later...
Posted

Hi

I have run into the same problem. I would love to have the date added be tied to the movie/episode and not the specific file for the movie/episode. I hav ethe quality in my filename so if I ever replace a 720p file of a movie with a 1080p file emby would interpret it as a new movie and change the date added. Keeping as much info in the filename as possible is important so changes that is not a option.

I tried working around it with nfo files, but I see that emby also creates those as a per file basis (and not per movie/episode). If the NFO plugin could create a movie.nfo file and use that for all files associated to whatever files in that folder and never changing the dateadded field.

Another solution could be to use the folder creation date for the movie. This wouldn't work for episodes though.

  • 8 months later...
Posted

Hi

I'm running into this problem again. I'm in the process of upgrading old movies from 720p to 1080p. My solution now is to manually make a note of the date added for the 720p quality, replace it with the 1080p file and then manually replace the date added field for the new entry. It's a hassle.

Is there a solution to this now or are you planning something?

Carlo
Posted

Hi, have you explored this option?
image.thumb.png.49a9c37b12c101a541dbb81077769344.png

Posted

Hi, yes I have seen that and tried that. The problem is that I create a new file for the new quality and therefore the file creation date is also that day. So it won't retain the library old date.

What would solve the problem as I see it is if "date scanned into the library" referred to the movie/episode/album in general, not the specific file. Or if there could be another option for that.

Carlo
Posted

Oh I understand.  In that case you would have to "touch" the file to change the file creation date to be what you want.

Posted

Yeah, but if I have to do that I could just change the date in emby instead. I was hoping this could be done without having to interfere. Just replace the old file and done.

Is it correct to say that the emby libraries are built on files attached with metadata and not metadata with a file attached? In my case I would prefer to add a movie to the library and then attach a file (or multiple files) to that movie entry. And those files could the be interchanged without touching the metadata (that are not tied to the file like resolution, sound etc.).

Posted

Having nfo files would be one portable way because then the date added value would be stored in the nfo.

  • Like 1
Posted

@Luke Doesn't the NFO file also follow the filename?

Posted

Yes, so you'd have to make sure to move and rename the nfo as needed.

  • Like 1
Posted

@LukeMy watched status is kept when adding a new file, so could there not be an option to "keep original date scanned into library" when replacing files? Which would follow TMDB id.

Carlo
Posted

That really wouldn't help because you could have 100K episode and never have watched a single item.
But this is one of the advantages of using NFO files which can store/hold onto information when items are moved out of libraries and then back in again.

Posted
14 minutes ago, amb13 said:

@LukeMy watched status is kept when adding a new file, so could there not be an option to "keep original date scanned into library" when replacing files? Which would follow TMDB id.

If you have an nfo it will. Without an nfo, there isn't' really a relationship between the old and the new files if they have different file names.

Posted

I see in the debuglog that when I delete the old file and add a new one Emby first deletes the movie entry and all it's metadata, then adds the new file as a new entry to the db and downloads all metadata again. Could this not be reversed so that it adds the new file to the already excising entry then deletes the entry to the old file?

Posted
Just now, amb13 said:

I see in the debuglog that when I delete the old file and add a new one Emby first deletes the movie entry and all it's metadata, then adds the new file as a new entry to the db and downloads all metadata again. Could this not be reversed so that it adds the new file to the already excising entry then deletes the entry to the old file?

Not exactly. The file itself is the entry.

Posted

Makes sense.

What I tried to work around this was remove the old file add the new file and then do the library scan (turned off automatic library updates), but it still got the date added as today

Posted

I think I've tried every workaround there is now, only way I know how to do it is by manual labor.

- Using NFOs - Same problem as with the file it self. Follows the filename. And therefore have to edit things manually.

- Scanning library manually after adding the new file. This just adds two entries of the same movie and sets the date for both to today.

- Deleting the old file, then adding the new file, then scanning. This creates a new entry with todays date.

@Luke Is this something you think will ever get a solution?

Posted

I mean sure, it's possible to try and come up with some special sauce to help with this scenario.

I'm just providing advice based on things you can do today.

Posted

@LukeThanks, I appreciate you taking the time and helping.

As I said I've tried every workaround I can think of. I was hoping there was some trick in the settings or a special scenario where a solution could be found, but alas it does not seem so unless you have any more ideas.

My ideas for a solution is to either somehow move the metadata to the new file when emby detects a similar named (but no exact) file in the same location. So kinda like having a new file with the same name, but just not a perfect match. Or adding the new file to the library, merging it with the old entry, and then removing the old entry from the library (keeping the old entries metadata).

 

Carlo
Posted

Have you tried using NFO file and this setting
image.png.9a8659830df5a9e49a94ebc692b07fbb.png

Posted

Got a new development.

I notice that when I delete the old file the nfo for the file is not deleted. So the folder structure is now with the new file:

Some movie (2020)/Some movie 2020 720p DTS.nfo
Some movie (2020)/Some movie 2020 1080p DDplus DTS.mkv

Now I can manually rename that old nfo-file to the same name as the new mkv-file before I scan the library and get the result I'm after.

Is there any way the new file/entry to the library can use this old file and rename it automatically?

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...