Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

dateadded: add < dateadded > to < videolibrary > in as.xml #1034

Merged
merged 1 commit into from Jun 9, 2012

Conversation

Projects
None yet
4 participants
Owner

Montellese commented Jun 1, 2012

There have been some (persistent) requests to get the old behaviour of "Sort by Date Added" back so I added a < dateadded > tag to < videolibrary > in advancedsettings.xml which can take the following values:

0 results in using the current datetime when adding a video. This is equivalent to the behaviour before introducing the dateadded feature.
1 (default) results in prefering to use the files mtime (if it's valid) and only using the file's ctime if the mtime isn't valid.
2 results in using the newer datetime of the file's mtime and ctime.

@ghost ghost assigned Montellese Jun 1, 2012

Member

jmarshallnz commented Jun 1, 2012

Looks fine.

Owner

tamland commented Jun 3, 2012

This is great, but I still think method 1 should be default instead of 2. This is because ctime have different meaning on different platforms and thus creating an inconsistency in xbmc across platforms as previously explained.

Especially on linux, where ctime is last metadata change, method 2 makes no sense as the order would change every time you rename a file or edit permissions. I believe this isn't what you intended (?)

Owner

Montellese commented Jun 3, 2012

Personally I would use method 1 as well but there were many complaints in the forums about that behaviour (which is why I added the ctime stuff in the first place). The initial implementation was method 1.

Owner

tamland commented Jun 6, 2012

Maybe the methods could be split into different behaviors instead of the purely technical descriptions of how it's implemented? Because method 2 will indeed behave differently on different platforms, while method 0 and 1 have consistent behavior.

dateadded: add <dateadded> to <videolibrary> in as.xml
0 results in using the current datetime when adding a video. This is equivalent to the behaviour before introducing the dateadded feature.
1 results in prefering to use the files mtime (if it's valid) and only using the file's ctime if the mtime isn't valid.
2 (default) results in using the newer datetime of the file's mtime and ctime.
Owner

Montellese commented Jun 9, 2012

After some consideration I changed the default value from 2 to 1 as that's what I feel makes more sense.

Montellese added a commit that referenced this pull request Jun 9, 2012

Merge pull request #1034 from Montellese/dateadded_configurable
dateadded: add <dateadded> to <videolibrary> in as.xml

@Montellese Montellese merged commit f48f943 into xbmc:master Jun 9, 2012

@Montellese: Value 0 does not work for me. See issue #2354.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment