Skip to content

[change] deluge - Render label#1840

Merged
liiight merged 3 commits intodevelopfrom
deluge_jinja-label
Jun 1, 2017
Merged

[change] deluge - Render label#1840
liiight merged 3 commits intodevelopfrom
deluge_jinja-label

Conversation

@tubedogg
Copy link
Copy Markdown
Contributor

Motivation for changes:

Yet another step towards me not needing a custom deluge plugin anymore. (Also it's a feature request.)

Detailed changes:

The deluge option label is now a jinja-rendered field.

Implemented feature requests:

  • feathub #23

tubedogg added 2 commits May 24, 2017 16:53
The `deluge` option `label` is now rendered by Jinja.
label = format_label(entry.render(entry.get('label', config.get('label'))))
log.debug('Rendered label: %s', label)
except RenderError as e:
log.error('Error rendering label `%s`: %s', label, e)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you'll get a render error, won't label be undefined?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but if the render fails, except will cause it to continue to the next entry before it gets to using label.

@tubedogg
Copy link
Copy Markdown
Contributor Author

Any thoughts on this one?

@liiight
Copy link
Copy Markdown
Member

liiight commented Jun 1, 2017

i dont use deluge or have anything to do with the plugin so im hesitant to merge.
looks fine to me though. @cvium ?

@cvium cvium self-requested a review June 1, 2017 19:23
@liiight liiight merged commit adb144f into develop Jun 1, 2017
@tubedogg tubedogg deleted the deluge_jinja-label branch June 2, 2017 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants