Hello,
there is a “%if{condition,text}” function in beets (https://beets.readthedocs.io/en/stable/reference/pathformat.html), but I can’t work out the correct syntax.
What I want to get: I want to not have the “albumtype” in the new path if it is “album”, but I want to have " ($albumtype)" in the path if it is “ep” or “single”. Like this:
~/music/Beatles, The/Please Please Me/
~/music/Beatles, The/Twist and Shout (ep)/
(“Please Please me” is an album, “Twist and Shout” is an EP)
I started with EPs only to keep the syntax simple:
paths:
default: %the{$albumartist}/$album%if{albumtype:ep, ($albumtype)}/$track - $title
… but that way I also get the albumtype for albums, not only for EPs:
~/music/Beatles, The/Please Please Me (album)
~/music/Beatles, The/Twist and Shout (ep)
The same with:
default: %the{$albumartist}/$album%if{albumtype=ep, ($albumtype)}/$track - $title
default: %the{$albumartist}/$album%if{albumtype==ep, ($albumtype)}/$track - $title
default: %the{$albumartist}/$album%if{albumtype:'ep', ($albumtype)}/$track - $title
default: %the{$albumartist}/$album%if{albumtype='ep', ($albumtype)}/$track - $title
default: %the{$albumartist}/$album%if{albumtype=='ep', ($albumtype)}/$track - $title
What do I have to do to get the albumtype in my path only for EPs and Singles?
Thanks for your help!
Carl