But it’s not right, and I’m not sure exactly what logic I should be using instead of all the nested(if A and B) conditions. It’s also sort of repetitive.
In any case: To write the filename, use the square brackets for any part that should only appear if there is data for the field, e.g. %Author%[ - Series $num(%series%,2)] - %Title% (%year%) '['%isbn%']' {%_bitrate%Kbps}
This should work for the first and the third case.
The two differ because sometimes a series exists in which it’s not necessary to read the series in a particular order, such as situations where books in a series are loosely related to each other, but can each be read as standalones. Or perhaps there is an anthology of shorts that doesn’t actually belong in one particular point in the series. So the books still belong to a series (i.e. %series% is not null, there just is no value in the field where normally you’d see %series-part%
And than you, the square brackets were what I wasn’t getting in those cases.
AFAIK there is no "empty" field. Fields without value do no exist. So i wonder how you find out what a missing field SERIES means: is it a single book or one of the loosely connected ones?
I’m sorry, I’m not sure I understand the question. Or I think we’re both talking about the same thing using different language maybe?
I’m referring the the %%series-part% field not having a value in it (i.e. the metadata is missing that particular tag, otherwise field it would at least have a zero value, right?)
So basically, I’m looking for a way to express if the series part is null, which your solution with the brackets does by only including that part if it exists.
If SERIES is always filled if there is a series, only that for some the value is 0, and you do not want to see the 0, only the word series, then the expression could look like this: %Author%[ - Series$replace( $num(%series%,2),00,)] - %Title% (%year%) '['%isbn%']' {%_bitrate%Kbps}
I think maybe I’m not being explicit that %series-part% is a different field/tag than %series%. %series% is the name of a series. %series-part% is that specific book’s position within the series. Thank you for trying to help me figure it out, though.