Make growl work over the network. fixes #171

This commit is contained in:
Ruud
2012-04-30 10:45:43 +02:00
parent b761d78101
commit 57baa563a5
2 changed files with 23 additions and 0 deletions
@@ -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,
},
],
}
],
@@ -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