Posts: 3,579
Joined: Jan 2011
Reputation:
386
pkscout
Team-Kodi Member
Posts: 3,579
2014-12-12, 02:47
(This post was last modified: 2014-12-12, 02:47 by pkscout.)
I don't think it's an intentional change of behavior. From what I can tell it only affects Windows (my OS X machine doesn't exhibit the behavior). And for me it only occurs if I rename a file. If I don't rename a file and change it's creation and modification date, it seems to work fine.
Posts: 481
Joined: May 2014
Reputation:
34
Sorry, I didn't mean to suggest it was an intentional change.
I've encountered the problem when moving files from one drive to another. I have to do this once in a while for housekeeping but I always use Attribute Changer to put all file/folder dates back to the original creation date of the movie file so as not to mess up the sorting, this always worked fine in Gotham (and I'm sure early betas of Helix). With the latest Helix RC's however, even if I make sure the file dates are fixed before updating the library all those old movies that have been moved jump to the top of my list.
Posts: 6
Joined: Dec 2014
Reputation:
0
Hello folks!
Not sure if this is the same problem but I recently upgraded from Gotham to Helix and i'm having issues with the dates as well...
Short version... KODI RC3 is getting its dateadded dates from the date of the folder the movie is contained in and not from the file itself or from the nfo.
I started with a Windows 8.1 machine as a server running Gotham 13.2 and MySQL... I exported all database as individual files and then formatted the OS partition and installed Windows Server 2012 R2. Reinstalled MySQL and then KODI Helix RC3.
I have all my movies over 3 drives in individual folders (IE F:\Movies\Batman (1989)\Batman (1989).avi ) and somewhere along the way, the date modified times for all the movies in particular folder got set to todays date but the files themselves have the same date. Not sure how that happened... Anyway... the date modified for the folder is 2015, the date modified for the file is 2010, the date added tag inside the NFO is also 2010. But the movie gets set to the top of the recently added movies list. In another folder, the dates of the movies folders haven't changed and they remain the same.
It appears to have done the same thing for all my tv episodes as well since they are just listed alphabetically now.
I've tried importing using the same scraper I always use, importing using local nfo only and then just rescraping them entirely off the internet and it is still sticking the date of the FOLDER...
So lemme know if you need anymore info, i'm sure I can work out how to do debug logs etc.
Thank you. And sorry first post ever is me whinging.
Posts: 6
Joined: Dec 2014
Reputation:
0
Not on mine- I just checked. When I sort the movies in the library by date added, all the movies on the drive where the movie folders dates did not change (which is exFat btw) are listed at the bottom of the list with all various dates over the past 4 or 5 years. But from the other drives, ( ntfs ), they are all listed from 2 days ago in alphabetical order.
Posts: 481
Joined: May 2014
Reputation:
34
I'm not sure that proves your point and you're not explaining very clearly. You need to open up your MySQL database with something like HeidiSQL to confirm your theory - check the dateadded value in the actual database. You're saying your folder dates are somewhere in 2015, if your theory is correct, your dateAdded column will have values of 2015 for the NTFS movies.
Sounds to me like all your movies on the NTFS drive have been given the current date and time at the point they were scanned in and as the scan would have gone through in alphabetical order, that's how they appear.
Posts: 26
Joined: Nov 2011
Reputation:
1
2014-12-23, 13:54
(This post was last modified: 2014-12-24, 02:13 by tphoenix.)
Windows 7 here, getting the same issue. I use a program that changes my shows mtime to its original air date, and I have advancedsettings set to use mtime, but when I scan my TV shows they are not being sorted this way. Just thought I'd let you know it's affecting me too.
EDIT: After some testing it looks to me like Kodi is using the accessed date, instead of the modified date, when importing files to the library.
EDIT 2: Strike that. I added some movies from a test folder and they ended up with date added of 5/11/2014. This date is no where to be found in the folder or files anywhere...
Posts: 481
Joined: May 2014
Reputation:
34
2014-12-25, 22:09
(This post was last modified: 2014-12-25, 22:12 by beeswax.)
This isn't fixed in the final release. I've just had chance to do some more testing and Kodi is simply using the current date and time for the dateAdded value in MySQL regardless of the <dateadded> setting in advancedsettings.xml. Even though after moving a file and using Attribute Changer to change every single file and folder date back to, say, 2009, Kodi slaps the current date and time into the dateAdded SQL column.
I tried moving 3 movies, one at a time, closing and re-opening Kodi between each and changing the <dateadded> setting in advancedsettings.xml. Whether it's 0,1 or 2 it does the same thing.
I don't know if it's worth mentioning that before doing this test, I didn't even have the <dateadded> setting in advancedsettings.xml configured as the default of 1 should (and has in Gothem -> Early Helix betas) work fine. So it's broken whether the option is configured or not.
Posts: 325
Joined: Apr 2004
Reputation:
6
2014-12-28, 09:28
(This post was last modified: 2014-12-28, 09:38 by jubilex.)
I'm using Windows 8.1 and Helix 14.0. Running in portable mode, if that matters.
I'm having the issue as well. Recently Added, as well as my own playlist that sorts by Date Added, are hopelessly out of whack. Movies from years ago are above movies from yesterday or sandwiched between two movies from a month ago.
None of my movie files or folders have been moved, renamed, or altered in any way since I had it all working in Gotham.
I can't for the life of me figure out where the order Kodi is using is coming from. The created/modified/access dates on the files and the folders they're in are exactly what they should be and exactly what they have always been. I exported the XML from Kodi and the <dateadded> for the first movie I noticed in the wrong place did not correspond to today's date, the date I added my library, or any of the created/modified/accessed dates for the mkv, the nfo, or the folder.
I've tried with and without the various <datedadded> options in advancedsettings.xml. I've also tried with and without "Local Information Only" in the content chooser.
Posts: 325
Joined: Apr 2004
Reputation:
6
So to be clear, none of the <dateadded> options in advancedsettings will use the correct create/modified date of the file, the nfo, or the folder; nor will Kodi import the <createdate> in the NFO (as generated by Media Companion or whatever). So there is currently no way to import an existing library into Kodi and have it be correctly sorted by date.