My OCD is giving me fits over an inconsistency in alphabetical ordering of my playlist groups in CUI. It appears that for two strings that are equal up until the termination of the shorter string, the longer one is actually listed first. For example, I'll load up an artist and see this in the NG Playlist:
1. Albumname (Bonus Disc)
2. Albumname
Either that, or sorting by 'album' should give correct results. My sorting method, which I put under Prefs - ColumnsUI - Playlist view - Columns - Some column - Scripts - Sort:
$if($or($strcmp(%comment%,'compilation'),$strcmp(%album artist%,Various Artists)),
// comp: end -> album -> tracknr -> song
// va: end end -> album -> tracknr -> song
$if($strcmp(%album artist%,Various Artists),?,)
?
$if2(%album%,?%directoryname%)
$repeat($char(32),20)
$if2(%discnumber%,999)
$if2(%tracknumber%,999)
$if2($meta(title),%filename_ext%),
//normal
$if2(%album artist%,????$directory(%path%,2))
$if($or($strcmp(%comment%,'live'),$strcmp(%comment%,'compilation')),2,1)
$if2(%date%,$if($and($strcmp($strchr(%directoryname%,'('),1),$strcmp($strchr(%directoryname%,')'),6)),$substr(%directoryname%,2,5),9999))
$if2(%album%,?%directoryname%)
$repeat($char(32),20)
$if2(%discnumber%,999)
$if2(%tracknumber%,999)
$if2($meta(title),%filename_ext%))
This sorts everything by artist->date->album->disknr->tracknr->title, trying to guess some values and putting compilations and lives to the very end of the playlist. $repeat($char(32),20) avoids inconsistencies in album names.