- View by listeners: example patterns for library viewers:
Library tree:
$nodisplay{$sub(999999999,$replace([%Artist Listeners Last.fm%],',',,.,, ,)) - %artist%}[%Artist Listeners Last.fm% - ]%artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
Album list:
[$replace(%Artist Listeners Last.fm%,',',,.,, ,) - ] %artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
For Album list the sorting it's in ascending order. How can we sort in descending order ? For Library tree the sorting is ok
You have to use the $sub(999999999 part. It does 9999... - X, so the greater X values will output lower final values... thus inverting the sort order. Btw you can play with sorting using Playlist Tools since it allows you to input a TF expression, so you can see in real live the changes in a playlist (and then copy back to any other plugin, the library views or into foobar2000 sorting contextual menu).
I may have copied it wrong, but you get the idea...
[$sub(999999999,$replace(%Artist Listeners Last.fm%,',',,.,, ,)) - ] %artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
EDIT: note the $nodisplay is a library tree thing. If you sort by a value in other viewers, the value must be shown at the viewer! i.e. the listening count (reversed with 9999...) will be the first value on the previous example.