Allow the sending of the prowl url parameter#1314
Merged
liiight merged 3 commits intoFlexget:developfrom Aug 7, 2016
Merged
Conversation
This alteration allows the prowl message to link to a user defined url
Such as the imdb page for a movie
``` prowl:
apikey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
event: 'New movie'
description: '{{title}}'
url: '{{imdb_url}}'```
Or for the more tech savy a custom page that deals with the torrent
``` prowl:
apikey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
event: 'New movie'
description: '{{title}}'
url: 'https://myserver.com/ctrl/{{torrent_info_hash}}'```
| try: | ||
| message_url = entry.render(message_url) | ||
| except RenderError as e: | ||
| log.error('Error rendering jinja url: %s' % e) |
Member
There was a problem hiding this comment.
You need to supply a default for message_url or it'll crash when you try to send if a RenderError as occured.
| event = entry.get('event', config['event']) | ||
| priority = entry.get('priority', config['priority']) | ||
| description = config.get('description', entry['title']) | ||
| message_url = config.get('url', '') |
Contributor
Author
There was a problem hiding this comment.
This should set a default blank url!?
| try: | ||
| message_url = entry.render(message_url) | ||
| except RenderError as e: | ||
| message_url = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for changes:
Allow the sending of the url parameter in prowl notifications
Detailed changes:
This alteration allows the prowl message to link to a user defined url
Such as the imdb page for a movie
Or for the more tech savy a custom page that deals with the torrent
Addressed issues:
n/a
Config usage if relevant (new plugin or updated schema):
Log and/or tests output (preferably both):