Notify when a new CP version is available. close #56

This commit is contained in:
Ruud
2011-10-17 22:02:19 +02:00
parent 221c413aac
commit 5f673f95e5
3 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ class Notification(Plugin):
default_title = 'CouchPotato'
test_message = 'ZOMG Lazors Pewpewpew!'
listen_to = ['movie.downloaded', 'movie.snatched']
listen_to = ['movie.downloaded', 'movie.snatched', 'updater.available']
dont_listen_to = []
def __init__(self):
@@ -18,6 +18,12 @@ config = [{
'default': True,
'type': 'enabler',
},
{
'name': 'notification',
'type': 'bool',
'default': True,
'description': 'Send a notification if an update is available.',
},
{
'name': 'automatic',
'default': True,
+1
View File
@@ -78,6 +78,7 @@ class Updater(Plugin):
self.doUpdate()
else:
self.update_version = remote.hash
fireEvent('updater.available', message = 'A new update is available', data = self.getVersion())
self.last_check = time.time()