MCPcopy Index your code
hub / github.com/pyload/pyload / send

Method send

module/plugins/hooks/AppriseNotify.py:35–52  ·  view source on GitHub ↗
(self, event, msg, key)

Source from the content-addressed store, hash-verified

33 return self.config.get("configs").split(',')
34
35 def send(self, event, msg, key):
36 if not check_module("apprise"):
37 self.log_error(_("Cannot send notification: apprise is not installed."),
38 _("Install apprise by issuing 'pip install apprise' command."))
39 return
40
41 import apprise
42
43 apprise_obj = apprise.Apprise()
44 apprise_config = apprise.AppriseConfig()
45
46 for c in key:
47 apprise_config.add(c)
48
49 apprise_obj.add(apprise_config)
50
51 apprise_obj.notify(title=self.config.get("title"),
52 body="%s: %s" % (event, msg) if msg else event)

Callers

nothing calls this directly

Calls 6

check_moduleFunction · 0.85
log_errorMethod · 0.80
notifyMethod · 0.80
_Function · 0.50
addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected