Skip to content

Commit

Permalink
Fix call to _generate_recipients() (#9720)
Browse files Browse the repository at this point in the history
* Fix call to _generate_recipients()

* update changelog
  • Loading branch information
p0psicles authored Jul 9, 2021
1 parent df88883 commit 8bc81b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#### Improvements

#### Fixes
- Fix prowl notifications ([9720](https://github.com/pymedusa/Medusa/pull/9720))

-----

Expand Down
12 changes: 4 additions & 8 deletions medusa/notifiers/prowl.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,26 @@ def notify_snatch(self, title, message, ep_obj):
message=message)

def notify_download(self, ep_obj):
ep_name = ep_obj.pretty_name_with_quality()
if app.PROWL_NOTIFY_ONDOWNLOAD:
show = self._parse_episode(ep_name)
recipients = self._generate_recipients(show)
recipients = self._generate_recipients(ep_obj.series)
if not recipients:
log.debug('Skipping prowl notify because there are no configured recipients')
else:
for api in recipients:
self._send_prowl(prowl_api=api, prowl_priority=None,
event=common.notifyStrings[common.NOTIFY_DOWNLOAD],
message=ep_name)
message=ep_obj.pretty_name_with_quality())

def notify_subtitle_download(self, ep_obj, lang):
ep_name = ep_obj.pretty_name()
if app.PROWL_NOTIFY_ONSUBTITLEDOWNLOAD:
show = self._parse_episode(ep_name)
recipients = self._generate_recipients(show)
recipients = self._generate_recipients(ep_obj.series)
if not recipients:
log.debug('Skipping prowl notify because there are no configured recipients')
else:
for api in recipients:
self._send_prowl(prowl_api=api, prowl_priority=None,
event=common.notifyStrings[common.NOTIFY_SUBTITLE_DOWNLOAD],
message=ep_name + ' [' + lang + ']')
message=f'{ep_obj.pretty_name()} [{lang}]')

def notify_git_update(self, new_version='??'):
if app.USE_PROWL:
Expand Down

0 comments on commit 8bc81b0

Please sign in to comment.