Kodi Community Forum

Full Version: A challenge with Date-Added
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
There have been a few times where I've had to almost start from scratch with Kodi using Libreelec. I recently incorporated the RRRs into my process, which required a massive rejigging of my library. I thought I was prepared properly and rescanned the library before running a clean operation but I missed something.

Well, the library was completely blown up, and I had to rescan the whole thing. That's where the Date Added concern comes from.

I usually sort the library by, as you can guess, Date Added. When items are scanned in, that's when Kodi deems them added to the library. But because it had to rebuild the library from scratch, that original date is now the current date. Kodi does not seem to look at the file creation date as the date added. 

Because I am using the RRR's apps I checked the nfo files they create, and there is no date-added field added there either. I do sync the library and watched status in Trakt, but that does not seem to also sync over the date the item was added to the library.

I understand that, eventually, the library will get back to showing the latest additions at the top again. But I am also anticipating that something will blow up the system again and require another rescan of the library.

Has anyone else run into this before and figured out a solution?

Is there not a way were we can tag imported items in some way that keeps that data intact in the event of a library rebuild?
(2023-02-18, 18:38)AGLyons Wrote: [ -> ]Has anyone else run into this before and figured out a solution?

Have you tried changing the setting of date_added in the advancedsetting.xml file ?
I have looked into that before, and I did have a '1' set. But if files are moved or renamed -as the RRRs did, the mdate changes.

The only safety I had was scanning the library before cleaning invalid entries. That would trick Kodi into keeping the existing and now missing file's added date and show a duplicate. Once the cleaning is processed, the missing dupes will be cleared up. But I made a mistake before the cleaning happened, which killed everything.

I know it's a dream, but it would be great if the Trakt plugin could sync over the added dates. Or, if Kodi wrote its own nfo files on import with the correct local metadata and stored them within the media folder, it could then re-read those in the event of a rebuild.
side note: when moving or renaming files you can use touch with a specified date to set the modified date to whatever you want, then kodi wont show a date different than you want

touch -d ...
 
Quote:-d, --date=STRING parse STRING and use it instead of current time

DATE STRING
       The --date=STRING is a mostly free format human readable date
       string such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29
       16:21:42" or even "next Thursday".  A date string may contain
       items indicating calendar date, time of day, time zone, day of
       week, relative time, relative date, and numbers.  An empty string
       indicates the beginning of the day.  The date string format is
       more complex than is easily documented here but is fully
       described in the info documentation.
Hey @jepsizofye 

As I recall, 'touch' is a linux command. And while Libreelec is a linux system, I am not a linux guy, perse. I know enough to break things but it takes me hours upon hours to figure out how I broke it and how to fix it. Most often it resorts to me reinstalling the whole thing from scratch again.

While 'touch' may solve the problem I have no idea how to process that across an entire library of +1000 files in an efficient way.

Thanks for the suggestion though!
right on
Thread moved to OS independent support