$albumtype ONLY if NOT album?


#1

In my paths I have $albumtype. But considering the vast majority of my folders ARE albums, how can I have it so that the $albumtype gets written ONLY IF album type is NOT album? ie. EP, SINGLE etc.?

Here’s what is currently in my path:
%the{$albumartist} - $original_year - $album%aunique{} [%upper{$albumtype}]/$albumartist - $track - $title ($bitrate)

so for example:

Beirut - 2007 - Lon Gisland [EP]/Beirut - 01 - Elephant Gun (972kbps).flac
has [EP] to denote

Beirut - 2006 - Gulag Orkestar/Beirut - 01 - The Gulag Orkestar (876kbps).flac
doesn’t have any type defined. it’s an album!


#2

I think the right tool is the inline plugin, which lets you write logic using Python expressions. For example, you could define a field to be '[' + albumtype + ']' if albumtype != 'Album' else ''. Or you could define a field called is_album that contains 1 or 0 depending on $albumtype and use that in an %if expression in your path template.