mirror of
https://github.com/evilhero/mylar
synced 2025-02-22 14:00:32 +00:00
Added downloader and source to Slack notification
This commit is contained in:
parent
dc937c8781
commit
4350d701e8
2 changed files with 4 additions and 2 deletions
|
@ -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": [
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue