Solved Song sorting by dates (TDOR, TDRC, TDRL) not just YEAR
#11
As a first implementation, the UI could stay as 'Sort on Date' whilst internally the code had some priority for which date to use? possibly configurable through advancedsettings.xml?

Off the top of my head I am imagining something like this:

<datedetection>
<tagpriority>
TDRC,TDRL,TYER
</tagpriority>
</datedetection>

This would effectively be instructing Kodi to use TDRC if available, else TDRL, else TYER.

I think it would be too confusion for most users to choose 'sort by year' 'sort by release date' 'sort by recording date' as there are possibly 4 or 5 date tags and their precise usage can be confusing.
There is probably a case for being able to define the priority under music settings UI in the future though, but the XML is probably good enough for the moment.

Also, for an Album Date, either this has to be detected when all album track dates match, or if it's supplied in the Album NFO (but again, most taggers / NFO creators only supply a year). What is Kodi going to do if there are differences in the dates for Album tracks? what should it assume the date for the Album is?

I would suggest something like this:

1) Read each track date tag (according to the priority order set in the XML) - thus you now have one 'date' for the track
2) When all dates have been read for all tracks, set about determining the album date:
2a) Set the album date to the latest date found on any of the tracks (latest date makes more sense than earliest date, because it's illogical to have an album date earlier than any child / track).
Reply


Messages In This Thread
RE: Song sorting order - by jjd-uk - 2016-08-23, 18:32
RE: Song sorting order - by jjd-uk - 2016-08-23, 18:36
RE: Song sorting order - by AnalogKid - 2016-08-23, 21:31
RE: Song sorting order - by scott967 - 2016-08-23, 21:59
RE: Song sorting order - by AnalogKid - 2016-08-24, 11:55
RE: Song sorting order - by jjd-uk - 2016-08-24, 13:43
RE: Song sorting order - by scott967 - 2016-08-24, 21:38
RE: Song sorting order - by DaveBlake - 2016-08-25, 09:11
RE: Song sorting order - by jjd-uk - 2016-08-25, 10:12
RE: Song sorting order - by AnalogKid - 2016-08-25, 13:27
RE: Song sorting order - by jjd-uk - 2016-08-25, 15:05
RE: Song sorting order - by DaveBlake - 2016-08-25, 15:30
RE: Song sorting order - by AnalogKid - 2016-08-25, 15:31
RE: Song sorting order - by AnalogKid - 2016-08-25, 16:38
RE: Song sorting order - by DaveBlake - 2016-08-25, 16:59
RE: Song sorting order - by AnalogKid - 2016-08-25, 17:18
RE: Song sorting order - by DaveBlake - 2016-08-25, 17:35
RE: Song sorting order - by AnalogKid - 2016-08-25, 17:52
Logout Mark Read Team Forum Stats Members Help
Song sorting by dates (TDOR, TDRC, TDRL) not just YEAR0