mirror of
https://github.com/evilhero/mylar
synced 2025-03-15 08:18:44 +00:00
IMP: fixed slack notifications when post-processing, updated notifiers.py for slack to accomodate post-processing as well as snatches
This commit is contained in:
parent
28c36d7e0e
commit
354c002fb2
2 changed files with 8 additions and 5 deletions
|
@ -2794,7 +2794,7 @@ class PostProcessor(object):
|
|||
|
||||
if mylar.CONFIG.SLACK_ENABLED:
|
||||
slack = notifiers.SLACK()
|
||||
slack.notify("Download and Postprocessing completed", prline, module=module)
|
||||
slack.notify("Download and Postprocessing completed", prline2, module=module)
|
||||
|
||||
if mylar.CONFIG.EMAIL_ENABLED and mylar.CONFIG.EMAIL_ONPOST:
|
||||
logger.info(u"Sending email notification")
|
||||
|
|
|
@ -538,10 +538,13 @@ class SLACK:
|
|||
module = ''
|
||||
module += '[NOTIFIER]'
|
||||
|
||||
if all([sent_to is not None, prov is not None]):
|
||||
attachment_text += ' %s from %s and %s' % (snatched_nzb, prov, sent_to)
|
||||
elif sent_to is None:
|
||||
attachment_text += ' %s from %s' % (snatched_nzb, prov)
|
||||
if 'snatched' in attachment_text.lower():
|
||||
snatched_text = '%s: %s' % (attachment_text, snatched_nzb)
|
||||
if all([sent_to is not None, prov is not None]):
|
||||
snatched_text += ' from %s and %s' % (prov, sent_to)
|
||||
elif sent_to is None:
|
||||
snatched_text += ' from %s' % prov
|
||||
attachment_text = snatched_text
|
||||
else:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue