Bug XBMC can't show dates earlier that 1970?
#1
I don't know if this is a real bug or a design decision from the devs but I want to check it anyways.

I recently did some collecting of old movies and since I want to be able to sort all these movies both by date (year) and by name I don't want to prefix the movie file name with the year. I then came up with the idea to change the modified date on the file itself and use that when I want to sort by date.

This works great, except that XBMC won't show dates earlier than 1970 (unix time). Maybe not a bug and I don't really know if it's worth fixing since the narrow use case.

I'm running the latest XBMC on Mac OS X. Finder and the Terminal shows the date without any problem and can sort by this date without problems.

When I sort a file list by date in XBMC all I get is 1970 for dates earlier than 1970.

Maybe anyone can confirm this "problem"?

How to reproduce (in OS X)
1. Launch the terminal and cd into a dir added as source in XBMC.
2. Create a folder or file, mkdir folder
3. Change the modified date on the folder to something earlier than 1970. touch -t 196801010101 folder
4. Check the source in XBMC and sort by date.
Reply
#2
It works fine for me. I have the three stooges and Looney tunes on my xbmc
Reply
#3
(2013-09-03, 16:58)mk92595 Wrote: It works fine for me. I have the three stooges and Looney tunes on my xbmc

Did you change the file modification date on the file or folder? I'm not talking about year in the library mode, only in files mode.
Reply
#4
This is likely a conflict between Unix and XBMC that noone would ever see unless they tinker like you're doing. Unix time, which OS X is based on, starts January 1, 1970. Prior times are represented by a negative number. No computer file would have a real modified date before 1970, so what you're seeing is an artifact.

XBMC can easily sort media by either title or release date, as well as many other things. Perhaps there is another way to accomplish what you're trying to do.

Also, FYI, the year in the filename is not what XBMC uses to sort by year. It uses the release date in the database/nfo file. Normally, if the year appears in the file name it is not a prefix, but a suffix.
LibreELEC 10.0.4 * ViMediaManager or TinyMediaManager | Raspberry pi 4b
Sharing media from NAS via NFS (optical out to receiver, HDMI to TV) | TV remote with CEC / Bluetooth keyboard
Reply
#5
Most OSes don't allow you to date files before 1.1.70. NB the file of the 1930s movie was NOT created in 1930. Expecting the system's file creation or modification date to reflect the date the movie's release date is, well, ridiculous.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#6
Yeah, as I thought it's not really a bug and it's probably nothing that's getting fixed.

Thanks for your feedback guys.
Reply
#7
I just came across this anomaly. Logically if a file can be set to a certain date, then Kodi should reflect it, simple as. Otherwise you could argue well why even go back as far as 1970 then as none of the file formats that Kodi supports existed then either!

Interestingly MrMC (current version as of 2016-03-08) on AppleTV and iPhone DOES work correctly with dates going back to 1910-01-01, but I notice that files with a date of 1900-01-01 don't appear in the library at all.

However Kodi on OSX & Android (Jarvis) any files with a Modified date before 1970 are given a date of today, which is really annoying. I also noticed that on all versions the <dateadded> in the nfo file is ALWAYS ignored.

The reason for wanting this is that Kodi lacks the ability to sort by release date. You can sort by year but it then just sorts the films within each year alphabetically / at random (I can see both random and alphabetic patterns within years on close inspection, so not sure what it's doing).

I can't see why anyone would be against it accepting dates as far back as 1888, they're free not to use it. Either that or make sort by year use release date which would be better still, or maybe both so all options are on the table.
Reply
#8
No file with a real creation date like this exists, so this doesn't make much sense.
But feel free to submit a PR for discussion.
Reply
#9
Sorry, what's a PR?
Reply
#10
Pull Request https://help.github.com/articles/using-pull-requests/
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#11
OIC you want me to write & test the code and then submit it and see if anyone is interested in including it?
Sorry I don't have the time at the moment, I focus any spare time I do have on my own 'free' program for media libraries.

IMHO it's a shame that Kodi has this restriction, which in turn means we are unable to sort movies by ReleaseDate, as removing it would affect no one.

However <dateadded> works correctly on MrMc's Kodi release for Apple TV/iPad/iPhone which is what I mainly use so it's not actually a problem for me at present.

OK, thanks for your time and thanks to Team Kodi for all their hard work.
Reply
#12
Kodi does not establish release date of a movie by the creation date of the file. It establishes it from metadata stored in the database. The file creation date is completely irrelevant.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#13
(2013-09-03, 15:51)CyberPig Wrote: I recently did some collecting of old movies and since I want to be able to sort all these movies both by date (year) and by name I don't want to prefix the movie file name with the year.
Why would you want to?
Around The World In 80 Days (1956).avi
Ben-Hur (1959).avi
Duck Soup (1933).avi
Reply
#14
This is a silly way to get around a simple skinning issue. IIRC, Kodi's new default skin will do exactly what you want, and without abusing file creation dates. You see a list of movies (by name) that also shows a column with the year in it.
Reply
#15
Just establishing the facts as there seems to be some confusion:-

There is NO way to order by ReleaseDate in Kodi.
Using the <dateadded> field is the ONLY viable workaround at present (afaik) as it is the ONLY date that is sortable/viewable in Kodi.
Sorting by Year IS NOT the same as sorting by ReleaseDate.
I DO have metadata set via .nfo files with Premiered + Aired fields BOTH set to Movie ReleaseDate BUT there is no option to either sort by or even see this date in Kodi.

If any of this is incorrect, please advise.
I have complete control over the Kodi Metadata as I generate it all myself using .nfo and artwork files via my own program, so I can alter anything that I wish.
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC can't show dates earlier that 1970?0