Notification update
This commit is contained in:
1 parent
b69bab4235
commit
31e57b9510
15 files changed
+112
-70
No files matched your search
@@ -1,5 +1,3 @@
|
||||
from couchpotato.api import addApiView
|
||||
from couchpotato.core.event import addEvent
|
||||
from couchpotato.core.helpers.encoding import toUnicode
|
||||
from couchpotato.core.logger import CPLog
|
||||
from couchpotato.core.notifications.base import Notification
|
||||
@@ -11,16 +9,10 @@ log = CPLog(__name__)
|
||||
|
||||
class Prowl(Notification):
|
||||
|
||||
def __init__(self):
|
||||
addEvent('notify', self.notify)
|
||||
addEvent('notify.prowl', self.notify)
|
||||
listen_to = ['movie.downloaded', 'movie.snatched']
|
||||
|
||||
addApiView('notify.prowl.test', self.test)
|
||||
|
||||
def notify(self, message = '', data = {}):
|
||||
|
||||
if self.isDisabled():
|
||||
return
|
||||
def notify(self, message = '', data = {}, type = None):
|
||||
if self.dontNotify(type): return
|
||||
|
||||
http_handler = HTTPSConnection('api.prowlapp.com')
|
||||
|
||||
|
||||
Reference in new issue
Block a user