Returned slashes from the inline plugin

When using the “inline” plugin, foward slashes “/” in returned strings are converted to underscores. “_”

Is there any way to stop this behavior?

No, that’s not currently possible. All interpolated fields in path templates are sanitized so that they cannot create “surprise” directories. Sometimes it’s possible to accomplish what you want with %if, like in this setup:
https://beets.readthedocs.io/en/stable/faq.html#create-disc-n-directories-for-multi-disc-albums

Feature request then: Allow forward slashes for people who want surprise directories. :slight_smile:

1 Like

So I’m trying to work around this limitation and I’m getting errors I don’t understand. What’s wrong with this syntax?

item_fields:
    testfield: "Hello" if varname == "World"

I get the error:

config.yaml could not be read: while parsing a block mapping

and:

expected <block end>, but found '<scalar>'

Try quoting the value string.

Sorry, I’m not sure what you mean. I seem to have already quoted all the quotable parts.

You want more quotes around the entire right-hand side. :slight_smile: This is YAML syntax, so examples of other YAML files might help…

1 Like