Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Album Listing syntax help (Read 632 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Album Listing syntax help

Hi. Complete noob here.
I am trying to sort my library using the following syntax.
Code: [Select]
%samplerate%Hz · [$if($strcmp(%__encoding%,lossy),Lossy,%__bitspersample%bit)]|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%[ '['%samplerate%Hz']']
However, if the files are lossy, it doesn't returns "Lossy".

Tried using this one, which gave satisfactory results
Code: [Select]
%samplerate%Hz · [$if($strcmp(%__encoding%,lossy),%codec%,%__bitspersample%bit)]|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%[ '['%samplerate%Hz']']

What am I missing in the former one? Thanks in advance for any help

Re: Album Listing syntax help

Reply #1
I'm pretty sure it's due to the square brackets. Nothing displays unless a field within is displaying info. It appears
$if($strcmp(%__encoding%,lossy),Lossy,....
doesn't qualify as %__encoding% is being used for the string comparison, but not to display anything.
For your second example, %codec% displays if the string comparison returns true, so that works with the square brackets. Lossy doesn't as it's just plain text. This should work with the square brackets.
$if($strcmp(%__encoding%,lossy),$caps(%__encoding%),....

Re: Album Listing syntax help

Reply #2
By the way if a bullet looks better than a dot, the Alt code is Alt+7 (numeric keypad), or you can probably copy and paste this one.
%samplerate%Hz • [$if($strcmp(%
instead of
%samplerate%Hz · [$if($strcmp(%

Just a thought...