FS#12107 - Remove track-number generation heuristic from database
Opened by sideral (sideral) - Tuesday, 10 May 2011, 12:57 GMT
Last edited by sideral (sideral) - Monday, 06 June 2011, 23:08 GMT
The database has a feature that generates a track number from a track's file name in case that information is missing from the tags. This track number is used solely in the database for displaying and sorting views displaying collections of tracks (such as album views).
The track number is assumed to be the last pair of digits in the file's basename (sans the filename extension after the last "."). I find this heuristic rather problematic for two reasons: Given there's no track-number tag, (1) it assigns spurious track numbers for titles including multiple digits, and (2) typically I'd expect the track number to appear at the beginning of the filename, not at its end.
The attached experimental patch removes the track-number generation feature entirely. In result, tracks without a track-number tag are displayed without a track number and alphanumerically sorted by track title (not filename!).
This has the following effects:
* For tracks that do have a track number in their tags, nothing changes.
* For tracks that have no track number in either the tags or the file name, no spurious track number is generated and used for displaying / sorting. These tracks are now sorted by track title (the tagnavi.config default).
* For tracks that do have a track number in their file name (but not in their tags), this information is not used any longer and the tracks are now sorted by track title as well.
Arguably, tracks without a track-number tag by default could be sorted by the pathname of files, which often are organized and named in the intended track order. But this could be confusing as well and seems like just a another heuristic that's prone to break. Also, users can use the file browser or define their own filename-based %format sort in tagnavi.conf. I'd argue against making this the default for DB views.
Please comment on which behavior you find most desirable. Thanks!
Monday, 06 June 2011, 23:08 GMT
Reason for closing: Accepted
Additional comments about closing: Committed a sanitized version as r29982