HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: Sphix on 2006-11-04 03:30:29

Title: [albumlist panel] How to ignore 'The' when sorting by artist?
Post by: Sphix on 2006-11-04 03:30:29
Any way to do this?!

Thx in advance
Title: [albumlist panel] How to ignore 'The' when sorting by artist?
Post by: CepiPerez on 2006-11-04 03:51:41
Somebody correct me if I'm wrong, but there's no way to do this.
But you create a metadata called artistext (or whatever) and tag the artists without the 'the' word.
Then you can use this metadata for sort and the artist metadata for display in the playlist.

Another easy way?... anybody?
Title: [albumlist panel] How to ignore 'The' when sorting by artist?
Post by: gfngfgf on 2006-11-04 05:29:08
reference wiki (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Tips_%26_Tricks#.22The_Band.22_becomes_.22Band.2C_The.22)

Code: [Select]
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)

Use the code above in place of "%artist%" in your albumlist view.  Note, though, that album list panel sorts by whatever is displayed, so if you want it to ignore "The" while sorting, then you also have to tolerate that the display will also be "Band, The" instead of "The Band".

edit: fixed code tag
Title: [albumlist panel] How to ignore 'The' when sorting by artist?
Post by: Yotsuya on 2006-11-04 05:31:45
Well instead of sorting by %artist% you can sort by something like:

$ifequal($left($tolower(%artist%),4),the ,
$right(%artist%,$sub($len(%artist%),4)),
%artist%)

It's messy but it works. There are also several other messy approaches that have been discussed before.
Title: [albumlist panel] How to ignore 'The' when sorting by artist?
Post by: Sphix on 2006-11-04 16:45:55
reference wiki (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Tips_%26_Tricks#.22The_Band.22_becomes_.22Band.2C_The.22)

Code: [Select]
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)

Use the code above in place of "%artist%" in your albumlist view.  Note, though, that album list panel sorts by whatever is displayed, so if you want it to ignore "The" while sorting, then you also have to tolerate that the display will also be "Band, The" instead of "The Band".

edit: fixed code tag


Thanks dude! Exactly what I wanted, I've never seen the Foobar2000:Tips & Tricks session