Kodi Community Forum
Win "Date Added" incorrect for very old titles - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
---- Thread: Win "Date Added" incorrect for very old titles (/showthread.php?tid=338875)



"Date Added" incorrect for very old titles - Megalith - 2019-01-01

I modified Kodi so "Date Added" corresponds to the file date (<dateadded>1</dateadded>), but my oldest movies don't seem to sort correctly.

All of my files have been modified so their created/modified/accessed dates are set to when the movie was released, and my two oldest are the following:

2001: A Space Odyssey (May 12, 1968)
The Bridge on the Water Kwai (December 14, 1957)

For some reason, these two are sitting all the way near the top, next to movies that were just released. Seems like a bug?


RE: "Date Added" incorrect for very old titles - PatK - 2019-01-01

I'm a little unsure these movies have been scraped correctly, I note that "The Bridge on the Water Kwai (December 14, 1957)" should be River; and "2001: A Space Odyssey (May 12, 1968)" is best scraped as "2001 A Space Odyssey (1968)".  I should note the release date might be different, depending on the country or time of the year (New Year films are always shifted around).

Check inside the .nfo of these listings checking that the dates are set. A full debug log posted to a public pastebin and that URL linked back to this thread might shine a light on this mystery. Check my signature for the wiki on logs.


RE: "Date Added" incorrect for very old titles - Megalith - 2019-01-02

Sorry, that was just a typo on my part...the movies did scrape correctly (although I don't think that is important nor relevant, as the dates I am sorting by are from the media file itself and not scrapped metadata).

I'm not aware of any .nfo files being used, but I'll look into making a debug log.


RE: "Date Added" incorrect for very old titles - Megalith - 2019-01-02

Alright, I downloaded SQLite Database Browser to get a look at the dates, and it seems Kodi interprets very old and future dates incorrectly. 2001 is showing 2018-12-31 23:23:48.

I can't figure out how to edit the "dateAdded" field using the program, though...


RE: "Date Added" incorrect for very old titles - Karellen - 2019-01-02

(2019-01-02, 04:37)Megalith Wrote: I can't figure out how to edit the "dateAdded" field using the program, though...
Double click on the field will bring up the Edit Database Cell box. Change and Save. (ctrl-s or Write Changes from the menu)

If you have a range of old dates, can you pinpoint at which year/month/date the problem appears or disappears?


RE: "Date Added" incorrect for very old titles - Megalith - 2019-01-02

The program won't let me edit anything that is listed under "Views" in the Database Structure (Table, Indices, Views, Triggers). The following suggests I need to create a trigger, but I have no idea what that entails:

https://github.com/sqlitebrowser/sqlitebrowser/issues/141

Do you think I should try another program, or is this something inherent to SQL?

And I don't have any specific dates, but the oldest title that sorted correctly has a created/modified/accessed date of 8/14/1972. Anything that is future dated also seems to be problematic (e.g., Kodi will scrape a 1/10/19 file as the immediate, current date, 1/2/19).


RE: "Date Added" incorrect for very old titles - Karellen - 2019-01-02

(2019-01-02, 19:46)Megalith Wrote: The program won't let me edit anything that is listed under "Views"
Not sure what screen you are in, but if you open the db file, select Browse Data tab, select the Files table, you should be able to edit the cells under dateAdded

Maybe a screenshot of where you are might help.


RE: "Date Added" incorrect for very old titles - Megalith - 2019-01-02

Many thanks; I had been messing about in the wrong table ("movie_view" instead of "files").


RE: "Date Added" incorrect for very old titles - Megalith - 2019-01-02

I noticed something interesting as I was scrolling through the table: nearly all of my movies have a duplicate entry, with the only difference being the dateAdded field (one has the created/modified/accessed file date, while the other has the date the file was scanned by Kodi). Is this normal?


RE: "Date Added" incorrect for very old titles - Karellen - 2019-01-02

(2019-01-02, 20:29)Megalith Wrote: nearly all of my movies have a duplicate entry
Yes, this can happen if you had items in your library, but then you removed them because, say, you reorganised files on your hdd, and then added them back and they now have a different path. If you simply remove and add back without moving files, then there is no duplicate as the same record is used in the files table.

While a Clean Library will clean out most tables in the database, there are four tables that hold onto data, files being one of them. Path, bookmarks and streamdetails being the other three.


This forum uses Lukasz Tkacz MyBB addons.