From 57baa563a512e3835112fc1eaf260a7539139809 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 30 Apr 2012 10:45:43 +0200 Subject: [PATCH] Make growl work over the network. fixes #171 --- couchpotato/core/notifications/growl/__init__.py | 15 +++++++++++++++ couchpotato/core/notifications/growl/main.py | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/couchpotato/core/notifications/growl/__init__.py b/couchpotato/core/notifications/growl/__init__.py index 6db390fb..3e882b43 100644 --- a/couchpotato/core/notifications/growl/__init__.py +++ b/couchpotato/core/notifications/growl/__init__.py @@ -22,6 +22,21 @@ config = [{ 'advanced': True, 'description': 'Also send message when movie is snatched.', }, + { + 'name': 'hostname', + 'description': 'Notify growl over network. Needs restart.', + 'advanced': True, + }, + { + 'name': 'port', + 'type': 'int', + 'advanced': True, + }, + { + 'name': 'password', + 'type': 'password', + 'advanced': True, + }, ], } ], diff --git a/couchpotato/core/notifications/growl/main.py b/couchpotato/core/notifications/growl/main.py index 29ade280..06accc87 100644 --- a/couchpotato/core/notifications/growl/main.py +++ b/couchpotato/core/notifications/growl/main.py @@ -23,11 +23,19 @@ class Growl(Notification): def register(self): if self.registered: return try: + + hostname = self.conf('hostname') + password = self.conf('password') + port = self.conf('port') + self.growl = notifier.GrowlNotifier( applicationName = 'CouchPotato', notifications = ["Updates"], defaultNotifications = ["Updates"], applicationIcon = '%s/static/images/couch.png' % fireEvent('app.api_url', single = True), + hostname = hostname if hostname else 'localhost', + password = password if password else None, + port = port if port else 23053 ) self.growl.register() self.registered = True