Added downloader and source to Slack notification

This commit is contained in:
misleadingrhino 2018-07-30 16:44:17 -04:00 committed by evilhero
parent dc937c8781
commit 4350d701e8
2 changed files with 4 additions and 2 deletions

View File

@ -483,11 +483,13 @@ class SLACK:
def __init__(self, test_webhook_url=None):
self.webhook_url = mylar.CONFIG.SLACK_WEBHOOK_URL if test_webhook_url is None else test_webhook_url
def notify(self, text, attachment_text, module=None):
def notify(self, text, attachment_text, snatched_nzb=None, prov=None, sent_to=None, module=None):
if module is None:
module = ''
module += '[NOTIFIER]'
attachment_text += ' from ' + prov + ' and sent to ' + sent_to
payload = {
# "text": text,
# "attachments": [

View File

@ -2981,7 +2981,7 @@ def notify_snatch(nzbname, sent_to, modcomicname, comyear, IssueNumber, nzbprov)
if mylar.CONFIG.SLACK_ENABLED and mylar.CONFIG.SLACK_ONSNATCH:
logger.info(u"Sending Slack notification")
slack = notifiers.SLACK()
slack.notify("Snatched", snline)
slack.notify("Snatched", snline, snatched_nzb=nzbname, sent_to=sent_to, prov=nzbprov)
return