Browse Source

Few more growler->notifier

pull/514/merge
Safihre 9 years ago
committed by shypike
parent
commit
83b78d8a3f
  1. 10
      SABnzbd.py

10
SABnzbd.py

@ -98,7 +98,7 @@ import sabnzbd.config as config
import sabnzbd.cfg import sabnzbd.cfg
import sabnzbd.downloader import sabnzbd.downloader
from sabnzbd.encoding import unicoder, deunicode from sabnzbd.encoding import unicoder, deunicode
import sabnzbd.growler as growler import sabnzbd.notifier as notifier
import sabnzbd.zconfig import sabnzbd.zconfig
from threading import Thread from threading import Thread
@ -1557,7 +1557,7 @@ def main():
if sabnzbd.FOUNDATION: if sabnzbd.FOUNDATION:
import sabnzbd.osxmenu import sabnzbd.osxmenu
sabnzbd.osxmenu.notify("SAB_Launched", None) sabnzbd.osxmenu.notify("SAB_Launched", None)
growler.send_notification('SABnzbd%s' % growler.hostname(), notifier.send_notification('SABnzbd%s' % notifier.hostname(),
T('SABnzbd %s started') % sabnzbd.__version__, 'startup') T('SABnzbd %s started') % sabnzbd.__version__, 'startup')
# Now's the time to check for a new version # Now's the time to check for a new version
check_latest_version() check_latest_version()
@ -1606,11 +1606,11 @@ def main():
if sabnzbd.LAST_WARNING: if sabnzbd.LAST_WARNING:
msg = sabnzbd.LAST_WARNING msg = sabnzbd.LAST_WARNING
sabnzbd.LAST_WARNING = None sabnzbd.LAST_WARNING = None
sabnzbd.growler.send_notification(T('Warning'), msg, 'warning') sabnzbd.notifier.send_notification(T('Warning'), msg, 'warning')
if sabnzbd.LAST_ERROR: if sabnzbd.LAST_ERROR:
msg = sabnzbd.LAST_ERROR msg = sabnzbd.LAST_ERROR
sabnzbd.LAST_ERROR = None sabnzbd.LAST_ERROR = None
sabnzbd.growler.send_notification(T('Error'), msg, 'error') sabnzbd.notifier.send_notification(T('Error'), msg, 'error')
if sabnzbd.WIN_SERVICE: if sabnzbd.WIN_SERVICE:
rc = win32event.WaitForMultipleObjects((sabnzbd.WIN_SERVICE.hWaitStop, rc = win32event.WaitForMultipleObjects((sabnzbd.WIN_SERVICE.hWaitStop,
@ -1727,7 +1727,7 @@ def main():
# Failing AppHelper libary! # Failing AppHelper libary!
os._exit(0) os._exit(0)
else: else:
growler.send_notification('SABnzbd', T('SABnzbd shutdown finished'), 'startup') notifier.send_notification('SABnzbd', T('SABnzbd shutdown finished'), 'startup')
os._exit(0) os._exit(0)

Loading…
Cancel
Save