mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Completed migration to v2 Pushbullet API. Added extra debug logging.
This commit is contained in:
parent
480199085e
commit
789f87090a
@ -268,10 +268,12 @@ $(document).ready(function(){
|
||||
var devices = jQuery.parseJSON(data).devices;
|
||||
$("#pushbullet_device_list").html('');
|
||||
for (var i = 0; i < devices.length; i++) {
|
||||
if(devices[i].active == true) {
|
||||
if(current_pushbullet_device == devices[i].iden) {
|
||||
$("#pushbullet_device_list").append('<option value="'+devices[i].iden+'" selected>' + devices[i].extras.nickname + '</option>')
|
||||
$("#pushbullet_device_list").append('<option value="'+devices[i].iden+'" selected>' + devices[i].nickname + '</option>')
|
||||
} else {
|
||||
$("#pushbullet_device_list").append('<option value="'+devices[i].iden+'">' + devices[i].extras.nickname + '</option>')
|
||||
$("#pushbullet_device_list").append('<option value="'+devices[i].iden+'">' + devices[i].nickname + '</option>')
|
||||
}
|
||||
}
|
||||
}
|
||||
if(msg) {
|
||||
|
@ -69,7 +69,7 @@ class PushbulletNotifier:
|
||||
if method == 'POST':
|
||||
uri = '/v2/pushes'
|
||||
else:
|
||||
uri = '/api/devices'
|
||||
uri = '/v2/devices'
|
||||
|
||||
logger.log(u"Pushbullet event: " + str(event), logger.DEBUG)
|
||||
logger.log(u"Pushbullet message: " + str(message), logger.DEBUG)
|
||||
@ -106,6 +106,7 @@ class PushbulletNotifier:
|
||||
response = http_handler.getresponse()
|
||||
request_body = response.read()
|
||||
request_status = response.status
|
||||
logger.log(u"Pushbullet response: %s" % request_body, logger.DEBUG)
|
||||
|
||||
if request_status == 200:
|
||||
if testMessage:
|
||||
|
Loading…
Reference in New Issue
Block a user