Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
03751abc0e | ||
![]() |
a94207691f | ||
![]() |
dbc53ca710 | ||
![]() |
4c9ddbd8b7 | ||
![]() |
045c69f5d8 | ||
![]() |
71ae314c46 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v2.1.22 (2018-10-05)
|
||||||
|
|
||||||
|
* Notifications:
|
||||||
|
* Fix: Notification agent settings not loading when failed to retrieve some data.
|
||||||
|
* UI:
|
||||||
|
* Fix: Incorrectly showing localhost server in the setup wizard.
|
||||||
|
* Other:
|
||||||
|
* Fix: Incorrect redirect to HTTP when HTTPS proxy header is present.
|
||||||
|
* Fix: Websocket not connecting automatically after the setup wizard.
|
||||||
|
|
||||||
|
|
||||||
## v2.1.21 (2018-09-21)
|
## v2.1.21 (2018-09-21)
|
||||||
|
|
||||||
* Notifications:
|
* Notifications:
|
||||||
|
@@ -611,7 +611,6 @@ function PlexOAuth(success, error, pre) {
|
|||||||
if (typeof pre === "function") {
|
if (typeof pre === "function") {
|
||||||
pre()
|
pre()
|
||||||
}
|
}
|
||||||
clearTimeout(polling);
|
|
||||||
closePlexOAuthWindow();
|
closePlexOAuthWindow();
|
||||||
plex_oauth_window = PopupCenter('', 'Plex-OAuth', 600, 700);
|
plex_oauth_window = PopupCenter('', 'Plex-OAuth', 600, 700);
|
||||||
$(plex_oauth_window.document.body).html(plex_oauth_loader);
|
$(plex_oauth_window.document.body).html(plex_oauth_loader);
|
||||||
@@ -621,9 +620,9 @@ function PlexOAuth(success, error, pre) {
|
|||||||
const code = data.code;
|
const code = data.code;
|
||||||
|
|
||||||
plex_oauth_window.location = 'https://app.plex.tv/auth/#!?clientID=' + x_plex_headers['X-Plex-Client-Identifier'] + '&code=' + code;
|
plex_oauth_window.location = 'https://app.plex.tv/auth/#!?clientID=' + x_plex_headers['X-Plex-Client-Identifier'] + '&code=' + code;
|
||||||
|
polling = pin;
|
||||||
|
|
||||||
(function poll() {
|
(function poll() {
|
||||||
polling = setTimeout(function () {
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'https://plex.tv/api/v2/pins/' + pin,
|
url: 'https://plex.tv/api/v2/pins/' + pin,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@@ -636,22 +635,21 @@ function PlexOAuth(success, error, pre) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
|
if (textStatus !== "timeout") {
|
||||||
closePlexOAuthWindow();
|
closePlexOAuthWindow();
|
||||||
if (typeof error === "function") {
|
if (typeof error === "function") {
|
||||||
error()
|
error()
|
||||||
}
|
}
|
||||||
},
|
|
||||||
complete: function () {
|
|
||||||
if (!plex_oauth_window.closed){
|
|
||||||
poll();
|
|
||||||
} else {
|
|
||||||
clearTimeout(polling);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
timeout: 1000
|
complete: function () {
|
||||||
|
if (!plex_oauth_window.closed && polling === pin){
|
||||||
|
setTimeout(function() {poll()}, 1000);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
timeout: 10000
|
||||||
});
|
});
|
||||||
}, 1000);
|
|
||||||
})();
|
})();
|
||||||
}, function () {
|
}, function () {
|
||||||
closePlexOAuthWindow();
|
closePlexOAuthWindow();
|
||||||
|
@@ -90,6 +90,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<select class="form-control pms-settings selectize-pms-ip" id="pms_ip_selectize">
|
<select class="form-control pms-settings selectize-pms-ip" id="pms_ip_selectize">
|
||||||
|
% if config['pms_identifier']:
|
||||||
<option value="${config['pms_ip']}:${config['pms_port']}"
|
<option value="${config['pms_ip']}:${config['pms_port']}"
|
||||||
data-identifier="${config['pms_identifier']}"
|
data-identifier="${config['pms_identifier']}"
|
||||||
data-ip="${config['pms_ip']}"
|
data-ip="${config['pms_ip']}"
|
||||||
@@ -99,6 +100,7 @@
|
|||||||
data-is_cloud="${config['pms_is_cloud']}"
|
data-is_cloud="${config['pms_is_cloud']}"
|
||||||
data-label="${config['pms_name'] or 'Local'}"
|
data-label="${config['pms_name'] or 'Local'}"
|
||||||
selected>${config['pms_ip']}</option>
|
selected>${config['pms_ip']}</option>
|
||||||
|
% endif
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -2091,6 +2091,7 @@ class JOIN(Notifier):
|
|||||||
if self.config['api_key']:
|
if self.config['api_key']:
|
||||||
params = {'apikey': self.config['api_key']}
|
params = {'apikey': self.config['api_key']}
|
||||||
|
|
||||||
|
try:
|
||||||
r = requests.get('https://joinjoaomgcd.appspot.com/_ah/api/registration/v1/listDevices', params=params)
|
r = requests.get('https://joinjoaomgcd.appspot.com/_ah/api/registration/v1/listDevices', params=params)
|
||||||
|
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
@@ -2098,17 +2099,17 @@ class JOIN(Notifier):
|
|||||||
if response_data.get('success'):
|
if response_data.get('success'):
|
||||||
response_devices = response_data.get('records', [])
|
response_devices = response_data.get('records', [])
|
||||||
devices.update({d['deviceName']: d['deviceName'] for d in response_devices})
|
devices.update({d['deviceName']: d['deviceName'] for d in response_devices})
|
||||||
return devices
|
|
||||||
else:
|
else:
|
||||||
error_msg = response_data.get('errorMessage')
|
error_msg = response_data.get('errorMessage')
|
||||||
logger.info(u"Tautulli Notifiers :: Unable to retrieve {name} devices list: {msg}".format(name=self.NAME, msg=error_msg))
|
logger.error(u"Tautulli Notifiers :: Unable to retrieve {name} devices list: {msg}".format(name=self.NAME, msg=error_msg))
|
||||||
return devices
|
|
||||||
else:
|
else:
|
||||||
logger.error(u"Tautulli Notifiers :: Unable to retrieve {name} devices list: [{r.status_code}] {r.reason}".format(name=self.NAME, r=r))
|
logger.error(u"Tautulli Notifiers :: Unable to retrieve {name} devices list: [{r.status_code}] {r.reason}".format(name=self.NAME, r=r))
|
||||||
logger.debug(u"Tautulli Notifiers :: Request response: {}".format(request.server_message(r, True)))
|
logger.debug(u"Tautulli Notifiers :: Request response: {}".format(request.server_message(r, True)))
|
||||||
return devices
|
|
||||||
|
|
||||||
else:
|
except Exception as e:
|
||||||
|
logger.error(u"Tautulli Notifiers :: Unable to retrieve {name} devices list: {msg}".format(name=self.NAME, msg=e))
|
||||||
|
|
||||||
return devices
|
return devices
|
||||||
|
|
||||||
def return_config_options(self):
|
def return_config_options(self):
|
||||||
@@ -2679,27 +2680,28 @@ class PUSHBULLET(Notifier):
|
|||||||
return self.make_request('https://api.pushbullet.com/v2/pushes', headers=headers, json=data)
|
return self.make_request('https://api.pushbullet.com/v2/pushes', headers=headers, json=data)
|
||||||
|
|
||||||
def get_devices(self):
|
def get_devices(self):
|
||||||
|
devices = {'': ''}
|
||||||
|
|
||||||
if self.config['api_key']:
|
if self.config['api_key']:
|
||||||
headers = {'Content-type': "application/json",
|
headers = {'Content-type': "application/json",
|
||||||
'Access-Token': self.config['api_key']
|
'Access-Token': self.config['api_key']
|
||||||
}
|
}
|
||||||
|
try:
|
||||||
r = requests.get('https://api.pushbullet.com/v2/devices', headers=headers)
|
r = requests.get('https://api.pushbullet.com/v2/devices', headers=headers)
|
||||||
|
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
response_data = r.json()
|
response_data = r.json()
|
||||||
devices = response_data.get('devices', [])
|
pushbullet_devices = response_data.get('devices', [])
|
||||||
devices = {d['iden']: d['nickname'] for d in devices if d['active']}
|
devices.update({d['iden']: d['nickname'] for d in pushbullet_devices if d['active']})
|
||||||
devices.update({'': ''})
|
|
||||||
return devices
|
|
||||||
else:
|
else:
|
||||||
logger.error(u"Tautulli Notifiers :: Unable to retrieve {name} devices list: "
|
logger.error(u"Tautulli Notifiers :: Unable to retrieve {name} devices list: "
|
||||||
u"[{r.status_code}] {r.reason}".format(name=self.NAME, r=r))
|
u"[{r.status_code}] {r.reason}".format(name=self.NAME, r=r))
|
||||||
logger.debug(u"Tautulli Notifiers :: Request response: {}".format(request.server_message(r, True)))
|
logger.debug(u"Tautulli Notifiers :: Request response: {}".format(request.server_message(r, True)))
|
||||||
return {'': ''}
|
|
||||||
|
|
||||||
else:
|
except Exception as e:
|
||||||
return {'': ''}
|
logger.error(u"Tautulli Notifiers :: Unable to retrieve {name} devices list: {msg}".format(name=self.NAME, msg=e))
|
||||||
|
|
||||||
|
return devices
|
||||||
|
|
||||||
def return_config_options(self):
|
def return_config_options(self):
|
||||||
config_option = [{'label': 'Pushbullet Access Token',
|
config_option = [{'label': 'Pushbullet Access Token',
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
PLEXPY_BRANCH = "master"
|
PLEXPY_BRANCH = "master"
|
||||||
PLEXPY_RELEASE_VERSION = "v2.1.21"
|
PLEXPY_RELEASE_VERSION = "v2.1.22"
|
||||||
|
@@ -2990,6 +2990,7 @@ class WebInterface(object):
|
|||||||
# Get new server URLs for SSL communications and get new server friendly name
|
# Get new server URLs for SSL communications and get new server friendly name
|
||||||
if server_changed:
|
if server_changed:
|
||||||
plextv.get_server_resources()
|
plextv.get_server_resources()
|
||||||
|
if plexpy.WS_CONNECTED:
|
||||||
web_socket.reconnect()
|
web_socket.reconnect()
|
||||||
|
|
||||||
# If first run, start websocket
|
# If first run, start websocket
|
||||||
|
@@ -69,7 +69,7 @@ def initialize(options):
|
|||||||
|
|
||||||
if options['http_proxy']:
|
if options['http_proxy']:
|
||||||
# Overwrite cherrypy.tools.proxy with our own proxy handler
|
# Overwrite cherrypy.tools.proxy with our own proxy handler
|
||||||
cherrypy.tools.proxy = cherrypy.Tool('before_handler', proxy)
|
cherrypy.tools.proxy = cherrypy.Tool('before_handler', proxy, priority=1)
|
||||||
|
|
||||||
if options['http_password']:
|
if options['http_password']:
|
||||||
login_allowed = ["Tautulli admin (username is '%s')" % options['http_username']]
|
login_allowed = ["Tautulli admin (username is '%s')" % options['http_username']]
|
||||||
@@ -84,7 +84,7 @@ def initialize(options):
|
|||||||
else:
|
else:
|
||||||
auth_enabled = True
|
auth_enabled = True
|
||||||
basic_auth_enabled = False
|
basic_auth_enabled = False
|
||||||
cherrypy.tools.auth = cherrypy.Tool('before_handler', webauth.check_auth)
|
cherrypy.tools.auth = cherrypy.Tool('before_handler', webauth.check_auth, priority=2)
|
||||||
else:
|
else:
|
||||||
auth_enabled = basic_auth_enabled = False
|
auth_enabled = basic_auth_enabled = False
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user