Use new id for pushbullet. fix #2864

This commit is contained in:
Ruud
2014-02-17 20:41:03 +01:00
parent 8b747dff9b
commit 12adde8f80
@@ -1,5 +1,5 @@
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.helpers.variable import splitString
from couchpotato.core.logger import CPLog
from couchpotato.core.notifications.base import Notification
import base64
@@ -32,7 +32,7 @@ class Pushbullet(Notification):
response = self.request(
'pushes',
cache = False,
device_id = device,
device_iden = device,
type = 'note',
title = self.default_title,
body = toUnicode(message)
@@ -46,24 +46,7 @@ class Pushbullet(Notification):
return successful == len(devices)
def getDevices(self):
devices = [d.strip() for d in self.conf('devices').split(',')]
# Remove empty items
devices = [d for d in devices if len(d)]
# Break on any ids that aren't integers
valid_devices = []
for device_id in devices:
d = tryInt(device_id, None)
if not d:
log.error('Device ID "%s" is not valid', device_id)
return None
valid_devices.append(d)
return valid_devices
return splitString(self.conf('devices'))
def request(self, method, cache = True, **kwargs):
try: