Compare commits

...

4 Commits
v1.0 ... v1.0.1

Author SHA1 Message Date
Tim
001acfc24d v1.0.1 2015-08-13 19:20:23 +02:00
Tim
5abe314f9f Fix typo on graphs page causing date selection to break on Safari.
Add back bootstrap.css.map
2015-08-13 19:05:29 +02:00
Tim
d345893529 Allow SSL cert verify override on Plex.tv requests. 2015-08-12 23:18:37 +02:00
Tim
2c77f2df98 Update contrib file. 2015-08-11 22:56:16 +02:00
6 changed files with 22 additions and 7 deletions

View File

@@ -2,4 +2,9 @@
## v1.0 (2015-07-11)
* First release
* First release
## v1.0.1 (2015-07-13)
* Allow SSL certificate check override for certain systems with bad CA stores.
* Fix typo on graphs page causing date selection to break on Safari.

View File

@@ -12,7 +12,7 @@ In case you read this because you are posting an issue, please take a minute and
If you think you can contribute code to the PlexPy repository, do not hesitate to submit a pull request.
### Branches
All pull requests should be based on the `develop` branch, to minimize cross merges. When you want to develop a new feature, clone the repository with `git clone origin/develop -b FEATURE_NAME`. Use meaningful commit messages.
All pull requests should be based on the `dev` branch, to minimize cross merges. When you want to develop a new feature, clone the repository with `git clone origin/dev -b FEATURE_NAME`. Use meaningful commit messages.
### Python Code

File diff suppressed because one or more lines are too long

View File

@@ -461,7 +461,7 @@
})
// Tab3 opened
$('#graph-tabs a[href="#tabs-3"').on('shown.bs.tab', function (e) {
$('#graph-tabs a[href="#tabs-3"]').on('shown.bs.tab', function (e) {
e.preventDefault();
current_tab = $(this).attr('href');
$('#days-selection').hide();

View File

@@ -18,16 +18,18 @@ from plexpy import logger, helpers
from httplib import HTTPSConnection
from httplib import HTTPConnection
import ssl
class HTTPHandler(object):
"""
Retrieve data from Plex Server
"""
def __init__(self, host, port, token):
def __init__(self, host, port, token, ssl_verify=True):
self.host = host
self.port = str(port)
self.token = token
self.ssl_verify = ssl_verify
"""
Handle the HTTP requests.
@@ -50,9 +52,14 @@ class HTTPHandler(object):
if uri:
if proto.upper() == 'HTTPS':
handler = HTTPSConnection(self.host, self.port, timeout=10)
if not self.ssl_verify:
context = ssl._create_unverified_context()
handler = HTTPSConnection(host=self.host, port=self.port, timeout=10, context=context)
logger.warn(u"PlexPy HTTP Handler :: Unverified HTTPS request made. This connection is not secure.")
else:
handler = HTTPSConnection(host=self.host, port=self.port, timeout=10)
else:
handler = HTTPConnection(self.host, self.port, timeout=10)
handler = HTTPConnection(host=self.host, port=self.port, timeout=10)
token_string = ''
if not no_token:

View File

@@ -89,10 +89,12 @@ class PlexTV(object):
self.protocol = 'HTTPS'
self.username = username
self.password = password
self.ssl_verify = plexpy.CONFIG.VERIFY_SSL_CERT
self.request_handler = http_handler.HTTPHandler(host='plex.tv',
port=443,
token=plexpy.CONFIG.PMS_TOKEN)
token=plexpy.CONFIG.PMS_TOKEN,
ssl_verify=self.ssl_verify)
def get_plex_auth(self, output_format='raw'):
uri = '/users/sign_in.xml'