Bug Kodi 20: <dateadded>1</dateadded> in videolibrary node is not working. - 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: Bug Kodi 20: <dateadded>1</dateadded> in videolibrary node is not working. (/showthread.php?tid=367881) Pages:
1
2
|
Kodi 20: <dateadded>1</dateadded> in videolibrary node is not working. - Pr.Sinister - 2022-04-15 I have been updating my rather large library with H.265 versions of TV Show episodes & Movies. They keep showing up in my newly added episodes or movies when they didn't do that in a prior version of Kodi 19 Right now, it keeps using ctime instead of mtime. As you can see from the wiki, 1 is supposed to use mtime and only use ctime if mtime is invalid. Only way an mtime can be invalid is if it is prior to January 1st 1970. From wiki:
My advancedsettings.xml:
RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Karellen - 2022-04-15 (2022-04-15, 19:20)Pr.Sinister Wrote: I have been updating my rather large library with H.265 versions of TV Show episodes & Movies.If you are completely replacing the video file and rescraping it into Kodi, wouldn't it be reading the mtime / ctime of the new file, not the original file? I guess you are not using nfo files to add back to the library, otherwise that date you want would be in the <dateadded></dateadded> tag of the nfo file.
RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Pr.Sinister - 2022-04-15 (2022-04-15, 21:58)Karellen Wrote:(2022-04-15, 19:20)Pr.Sinister Wrote: I have been updating my rather large library with H.265 versions of TV Show episodes & Movies.If you are completely replacing the video file and rescraping it into Kodi, wouldn't it be reading the mtime / ctime of the new file, not the original file? Yes of course it is using the mtime of the new file. I do set the mtime of the new file to be the aired date. I do use NFO files but I don't want to use the dateadded from the NFO. In fact, my NFOs do NOT have that attribute:
RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Pr.Sinister - 2022-04-19 Is this something that will be fixed in Kodi 20? RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Karellen - 2022-04-19 (2022-04-19, 21:10)Pr.Sinister Wrote: Is this something that will be fixed in Kodi 20?No-one has tested it. How do you adjust the mtime and ctime in the file? Do you have a small file that you can share where those two times are different? RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Pr.Sinister - 2022-04-20 Sonarr does it automatically when adding an episode. Before i was using Sonarr and for my French TV Shows (Sonarr is amazing but sucks big floppy donkey dick for French TV Shows so i use Medusa), I used FileTouch to set all 3 dates to the air date set in the aired node of the NFO. I get the date from the NFO using Xidel. Sonarr only set the mtime. I wonder if there is new logic in Kodi that checks to see if ctime is bigger than mtime, it decides mtime is invalid. I always found it weird that you can have a Creation Date/Time be newer than the Modified Date/Time. Which is why in my script i set ALL dates to be the same Windows CMD Script: Code:
RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Karellen - 2022-04-20 I used BulkRename Utility to modify the times of a test file. I added <dateadded>1</dateadded> and I got the following...I also tried with <dateadded>2</dateadded> and got the same which is expected as mtime is preferred.I changed it to <dateadded>0</dateadded> and got the following...Maybe I am going down the wrong track, but I cannot replicate the problem you reported. RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Pr.Sinister - 2022-04-20 Set the created date to be AFTER the modified date and use <dateadded>1</dateadded> in advancedsettings.xml If i download a show form 2010, i want it to say i added it in 2010 so it doesn't show up in my recently added. THe creation date will be the moment i download the file. Again, using my script, all is fine cause all dates are the same. But with automated tools like Sonarr, it ONLY sets the mtime and the created is obviously now instead of 2010 RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Karellen - 2022-04-20 Like this... RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Pr.Sinister - 2022-04-20 Only thing i can think of is that my issue is with TV Show Episodes and not Movies RE: Kodi 19.4: <dateadded>1</dateadded> in videolibrary node is not working. - Pr.Sinister - 2023-03-13 Since this is still not fixed in v20, here are workarounds for SQLite and MySQL for people that would like to use the modified date as the date added. To recap, adding TV Show episodes to the library doesn't use the modified date even though it is specified in the advancedsettings.xml Because i am not being taken seriously with my bug reports, i am done reporting them even though i see plenty in v20. If i find a workaround, i can inform others though... For MySQL, run the following SQL Commands:
For SQLite:
RE: Kodi 20: <dateadded>1</dateadded> in videolibrary node is not working. - Pr.Sinister - 2023-03-14 I should specify: My modified date for TV Episodes is the aired date. That is why i am copying the aired date (c05) to the dateAdded RE: Kodi 20: <dateadded>1</dateadded> in videolibrary node is not working. - ryamoo - 2023-03-21 This has really got me scratching my head at the moment. A few months ago (december, and probably on latest stable V19), I replaced a bunch of movies, and used a "touch" command to change the modified date - "touch -d" with the date&time and file. I set them to the date of the original file so they would be in the list when I originally added them. I can't remember what step I took next, but it was either a "refresh" on the information for each Movie, or I re-added them. It worked, and the movies jumped back down the list when sorted by "date added" and happy days. Now, I can't get it to work. I've done the same touch command (grabbed it from bash_history and just replaced the filename) and I've added the Movie, I've refreshed information, I've put the "<dateadded>1</dateadded> in the advancedsettings.xml (it wasn't there last time I did this). I just cannot get it to use the historic date for dateadded. As far as I can tell, this is happening to me when adding on V20 and on 20.1. My database is mysql based, and clients share it. These are the "stat file.mkv" dates for one I did back in December: Code: Access: 2022-07-26 13:01:00.000000000 +0100 sql database shows: Code: +-----------------------+ I've tried using that same touch command and a slightly altered one on a Movie file now: Code: Access: 2022-07-26 13:00:00.000000000 +0100 Code: +------------------------+ Code: Access: 2022-07-26 13:00:00.000000000 +0100 On the movie I updated back in December, the NFO's dates had no bearing on the dateadded. Not sure what else I can try. I do plan on enabling extra logging to see if anything shows up there. RE: Kodi 20: <dateadded>1</dateadded> in videolibrary node is not working. - Pr.Sinister - 2023-03-21 (2023-03-21, 15:32)ryamoo Wrote: This has really got me scratching my head at the moment. Back in v19, it seemed that only the TV Episodes were affected by this and not Movies. I have about 500 Movies i need to replace with H265 versions and they are all sitting in a folder for 3 months now.. Once i get around to replacing them (prolly later this week), i'll post my findings here and the SQL command to fix it if it is indeed also broken. RE: Kodi 20: <dateadded>1</dateadded> in videolibrary node is not working. - ryamoo - 2024-02-28 A long time later, but I've finally got around to playing around with this to test different versions, because I wanted to replace a bunch of media but keep them in the same list position. I've reinstalled Kodi v19.5 on my Pi (headless, manages my media mounted on the Pi), and my PC (windows 10, accesses via nfs, with path subtitution). With Kodi V19.5 I can "touch -m" on the file on my Pi, and refresh on Windows Kodi, and the "dateAdded" changes based on the modified date I used with my touch command. In the below screenshot of my V19 database, you can see date added was 2024-02-20, I then touched it to be 19th Feb and you can see it was then 2024-01-19 in the database after refresh, then touched again to be 28th Feb, and you can see that too. Between each "touch", I used Kodi for Windows, brought up the context menu for the movie and selected "Information", then scrolled the buttons to the right and selected "Refresh" - it re-added to the the movie with an updated "date added" each time, moving the movie in my list (ordered by date added). Code: MariaDB [MyVideos119]> select c00, idMovie, idFile, dateAdded, c05, c09, premiered, rating, votes from movie_view where c00 like 'Test%' order by dateAdded DESC limit 5; I've then repeated this on Kodi 20.4, and the dateAdded is always the creation date. It's added to the database with the creation date, and doing a "touch" on the file to change the modified date doesn't change it (however you can see that some IDs changed, so it has re-scanned the file). Following the steps as above with 19.5 but on 20.4, the dateAdded stays the same in the database, and on my movie list it doesn't move and stays as "26/02/2024": Code:
and for completeness, tried on V21 Beta too, giving the same result as V20.4: Code:
I've also tried Kodi for Mac to do the re-add or refresh, and also tried removing from library and re-scanning to the library using Kodi on the Pi. On both, again only V19 adds it with the updated modified date as the dateAdded, V20 and V21 add it with the creation date. I'll gather logs to see if that shows anything, but I briefly checked last night and didn't spot anything that seemed relevant. |