Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix call to _generate_recipients() #9720

Merged
merged 2 commits into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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