Conditional field tracktotal > 100


hi all,

first of all, being new to beets i already love it. Thank you!

While importing the Harry Potter Audiobook i realized that it looks ugly to have Tracknumbering starting with ‘01’ and ending ‘108’. While most players will get along with this i wondered wether i can extend the tracknumbering to start with ‘001’ in such situations conditionally?

Rather then having clutter on filesystem in this special situation with Harry Potter Audiobook i tried this to remove conditionally the Tracknumber, but it dont work out:
albumtype:Audiobook: Hörbuch/$albumartist/%ifdef{year} $album%aunique{}/%if{$tracktotal < 100,$track,!$track} $title

Thanks in advance


Ah, yes, our padding is indeed hard-coded to two digits. Sorry about that!

Anyway, the right way to do this is to use the inline plugin. Our little %if expressions don’t support complex conditions like less-than comparisons, so inline lets you write them in Python instead.