Real fix for pushover

This commit is contained in:
rembo10
2015-07-23 11:25:06 +01:00
parent 71da960386
commit 1c236fe0f3
3 changed files with 4 additions and 4 deletions

View File

@@ -443,7 +443,7 @@ class PUSHBULLET(object):
self.apikey = headphones.CONFIG.PUSHBULLET_APIKEY
self.deviceid = headphones.CONFIG.PUSHBULLET_DEVICEID
def notify(self, message):
def notify(self, message, status):
if not headphones.CONFIG.PUSHBULLET_ENABLED:
return
@@ -451,7 +451,7 @@ class PUSHBULLET(object):
data = {'type': "note",
'title': "Headphones",
'body': message}
'body': message + ': ' + status}
if self.deviceid:
data['device_iden'] = self.deviceid

View File

@@ -475,7 +475,7 @@ def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list,
if headphones.CONFIG.PUSHBULLET_ENABLED:
logger.info(u"PushBullet request")
pushbullet = notifiers.PUSHBULLET()
pushbullet.notify(pushmessage, "Download and Postprocessing completed")
pushbullet.notify(pushmessage, statusmessage)
if headphones.CONFIG.TWITTER_ENABLED:
logger.info(u"Sending Twitter notification")

View File

@@ -932,7 +932,7 @@ def send_to_downloader(data, bestqual, album):
if headphones.CONFIG.PUSHBULLET_ENABLED and headphones.CONFIG.PUSHBULLET_ONSNATCH:
logger.info(u"Sending PushBullet notification")
pushbullet = notifiers.PUSHBULLET()
pushbullet.notify(name + " has been snatched!", "Download started")
pushbullet.notify(name, "Download started")
if headphones.CONFIG.TWITTER_ENABLED and headphones.CONFIG.TWITTER_ONSNATCH:
logger.info(u"Sending Twitter notification")
twitter = notifiers.TwitterNotifier()