From 2d3b41ef4d9e7d9a770e0fce4e42c002477798d2 Mon Sep 17 00:00:00 2001 From: Nic Wolfe <nic@wolfeden.ca> Date: Thu, 7 Apr 2011 19:31:24 -0600 Subject: [PATCH] Fix XBMC multiple host notifications --- sickbeard/notifiers/__init__.py | 17 ----------------- sickbeard/notifiers/xbmc.py | 8 +++++++- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/sickbeard/notifiers/__init__.py b/sickbeard/notifiers/__init__.py index 9a027842a..d2e8d4c60 100644 --- a/sickbeard/notifiers/__init__.py +++ b/sickbeard/notifiers/__init__.py @@ -59,20 +59,3 @@ def notify_snatch(ep_name): for n in notifiers: n.notify_snatch(ep_name) notifo_notifier.notify_snatch(ep_name) - -def notify(type, message): - - if type == NOTIFY_DOWNLOAD and sickbeard.XBMC_NOTIFY_ONDOWNLOAD == True: - xbmc.notifyXBMC(message, notifyStrings[type]) - - if type == NOTIFY_SNATCH and sickbeard.XBMC_NOTIFY_ONSNATCH: - xbmc.notifyXBMC(message, notifyStrings[type]) - - growl.sendGrowl(notifyStrings[type], message) - - prowl.sendProwl(message) - - notifo.notifyNotifo(message) - - if type == NOTIFY_DOWNLOAD: - tweet.notifyTwitter(message) diff --git a/sickbeard/notifiers/xbmc.py b/sickbeard/notifiers/xbmc.py index 3ccd4b4b1..8144b0fa4 100644 --- a/sickbeard/notifiers/xbmc.py +++ b/sickbeard/notifiers/xbmc.py @@ -130,10 +130,16 @@ class XBMCNotifier: fileString = title + "," + input + result = '' + for curHost in [x.strip() for x in host.split(",")]: command = {'command': 'ExecBuiltIn', 'parameter': 'Notification(' +fileString + ')' } logger.log(u"Sending notification to XBMC via host: "+ curHost +"username: "+ username + " password: " + password, logger.DEBUG) - return self._sendToXBMC(command, curHost, username, password) + if result: + result += ', ' + result += curHost + ':' + self._sendToXBMC(command, curHost, username, password) + + return result def _update_library(self, host, showName=None): -- GitLab