mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Completed migration to v2 Pushbullet API. Added extra debug logging.
This commit is contained in:
parent
480199085e
commit
789f87090a
2 changed files with 8 additions and 5 deletions
|
@ -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(current_pushbullet_device == devices[i].iden) {
|
||||
$("#pushbullet_device_list").append('<option value="'+devices[i].iden+'" selected>' + devices[i].extras.nickname + '</option>')
|
||||
} else {
|
||||
$("#pushbullet_device_list").append('<option value="'+devices[i].iden+'">' + devices[i].extras.nickname + '</option>')
|
||||
if(devices[i].active == true) {
|
||||
if(current_pushbullet_device == devices[i].iden) {
|
||||
$("#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].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 a new issue