Add Jinja templating to Transmission labels#3886
Add Jinja templating to Transmission labels#3886gazpachoking merged 8 commits intoFlexget:developfrom
Conversation
|
Are you certain that Transmission doesn't support commas in labels? Also I would update the docstring. |
|
|
I'm good with this, the only thing I'm dubious about is the string formatted comma delimited multi-label configuration. I think we should just require multiple labels to be in a list. labels: "Source: xyz, Series: {{series_name}}, Quality: {{quality}}"require this: labels:
- "Source: xyz"
- "Series: {{series_name}}"
- "Quality: {{quality}}" |
|
So, is concatenating labels from config and entry ok, since it's goes against how that usually works? |
Yeah, I guess that's good. Seems like it's a bit more flexible than just overriding config labels with entry labels. |
|
Are certain fields always available in templates? The documentation says that it will produce an empty string, but I noticed that invalid fields cause an exception. It should probably be done here the same. |
Yeah, that documentation is probably oversimplified/innacurate depending on where templates are being used. I'd say we should catch errors and log a warning then ignore that label for ones that the rendering failed here. |
|
Looks good. Thanks for this! |
Motivation for changes:
With this, some series properties can be automatically added as a label
Detailed changes:
labelscan be either a string or a list of stringsConfig usage if relevant (new plugin or updated schema):
This results in
["Source: xyz", "Series: The Show", "Quality: 1080p", "Drama", "Funny"]