Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fc98e2f052 | ||
![]() |
bedcfa9520 | ||
![]() |
bb152b590b | ||
![]() |
3623732cf7 | ||
![]() |
05ba89f164 | ||
![]() |
cee656a053 | ||
![]() |
cfc7d529e1 | ||
![]() |
a93dc68e6c | ||
![]() |
2d91cfd3db | ||
![]() |
36e81f44cb | ||
![]() |
cb0e65337f | ||
![]() |
1c627f4649 | ||
![]() |
16cbfed20b | ||
![]() |
f6a3bc57e2 | ||
![]() |
594443d1dc |
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,5 +1,25 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.4.4 (2016-05-24)
|
||||||
|
|
||||||
|
* Fix: Image queries crashing the PMS when playing clips from channels.
|
||||||
|
* Fix: Plexivity import if IP address is missing.
|
||||||
|
* Fix: Tooltips shown behind the datatable headers.
|
||||||
|
* Fix: Current activity instances rendered in a random order causing them to jump around.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.3 (2016-05-22)
|
||||||
|
|
||||||
|
* Fix: PlexPy not starting without any authentication method.
|
||||||
|
|
||||||
|
|
||||||
|
## v1.4.2 (2016-05-22)
|
||||||
|
|
||||||
|
* New: Option to use HTTP basic authentication instead of the HTML login form.
|
||||||
|
* Fix: Unable to save settings when enabling the HTTP proxy setting.
|
||||||
|
* Change: Match the PMS port when retrieving the PMS url.
|
||||||
|
|
||||||
|
|
||||||
## v1.4.1 (2016-05-20)
|
## v1.4.1 (2016-05-20)
|
||||||
|
|
||||||
* New: HTTP Proxy checkbox in the settings. Enable this if using an SSL enabled reverse proxy in front of PlexPy.
|
* New: HTTP Proxy checkbox in the settings. Enable this if using an SSL enabled reverse proxy in front of PlexPy.
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
<!---
|
<!---
|
||||||
Reporting Issues:
|
Reporting Issues:
|
||||||
* To ensure that a develpoer has enough information to work with please include all of the information below.
|
* To ensure that a developer has enough information to work with please include all of the information below.
|
||||||
Please provide as much detail as possible. Screenshots can be very useful to see the problem.
|
Please provide as much detail as possible. Screenshots can be very useful to see the problem.
|
||||||
* Use proper markdown syntax to structure your post (i.e. code/log in code blocks).
|
* Use proper markdown syntax to structure your post (i.e. code/log in code blocks).
|
||||||
See: https://help.github.com/articles/basic-writing-and-formatting-syntax/
|
See: https://help.github.com/articles/basic-writing-and-formatting-syntax/
|
||||||
* Iclude a link to your **FULL** log file that has the error(not just a few lines!).
|
* Include a link to your **FULL** log file that has the error(not just a few lines!).
|
||||||
Please use [Gist](http://gist.github.com) or [Pastebin](http://pastebin.com/).
|
Please use [Gist](http://gist.github.com) or [Pastebin](http://pastebin.com/).
|
||||||
|
|
||||||
Feature Requests:
|
Feature Requests:
|
||||||
|
@@ -214,6 +214,7 @@ def main():
|
|||||||
'https_key': plexpy.CONFIG.HTTPS_KEY,
|
'https_key': plexpy.CONFIG.HTTPS_KEY,
|
||||||
'http_username': plexpy.CONFIG.HTTP_USERNAME,
|
'http_username': plexpy.CONFIG.HTTP_USERNAME,
|
||||||
'http_password': plexpy.CONFIG.HTTP_PASSWORD,
|
'http_password': plexpy.CONFIG.HTTP_PASSWORD,
|
||||||
|
'http_basic_auth': plexpy.CONFIG.HTTP_BASIC_AUTH
|
||||||
}
|
}
|
||||||
webstart.initialize(web_config)
|
webstart.initialize(web_config)
|
||||||
|
|
||||||
|
@@ -61,6 +61,8 @@ DOCUMENTATION :: END
|
|||||||
|
|
||||||
% if data is not None:
|
% if data is not None:
|
||||||
<%
|
<%
|
||||||
|
from urllib import quote
|
||||||
|
|
||||||
from plexpy import helpers
|
from plexpy import helpers
|
||||||
data['indexes'] = helpers.cast_to_int(data['indexes'])
|
data['indexes'] = helpers.cast_to_int(data['indexes'])
|
||||||
%>
|
%>
|
||||||
@@ -90,9 +92,11 @@ DOCUMENTATION :: END
|
|||||||
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
|
||||||
% else:
|
% else:
|
||||||
% if data['art']:
|
% if data['art']:
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
|
<!--Hacky solution to escape the image url until I come up with something better-->
|
||||||
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${quote(data['art'])}&width=500&height=280&fallback=art);"></div>
|
||||||
% else:
|
% else:
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=280&fallback=art);"></div>
|
<!--Hacky solution to escape the image url until I come up with something better-->
|
||||||
|
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${quote(data['thumb'])}&width=500&height=280&fallback=art);"></div>
|
||||||
% endif
|
% endif
|
||||||
% endif
|
% endif
|
||||||
% elif data['media_type'] == 'photo':
|
% elif data['media_type'] == 'photo':
|
||||||
|
@@ -448,10 +448,10 @@ function childTableOptions(rowData) {
|
|||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
$('.expand-history-tooltip').tooltip({ container: 'body' });
|
$('.expand-history-tooltip').tooltip({ container: 'body' });
|
||||||
$('.external-ip-tooltip').tooltip();
|
$('.external-ip-tooltip').tooltip({ container: 'body' });
|
||||||
$('.transcode-tooltip').tooltip();
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
$('.media-type-tooltip').tooltip();
|
$('.media-type-tooltip').tooltip({ container: 'body' });
|
||||||
$('.watched-tooltip').tooltip();
|
$('.watched-tooltip').tooltip({ container: 'body' });
|
||||||
$('.thumb-tooltip').popover({
|
$('.thumb-tooltip').popover({
|
||||||
html: true,
|
html: true,
|
||||||
container: 'body',
|
container: 'body',
|
||||||
|
@@ -132,8 +132,8 @@ history_table_modal_options = {
|
|||||||
$('#ajaxMsg').fadeOut();
|
$('#ajaxMsg').fadeOut();
|
||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
$('.transcode-tooltip').tooltip();
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
$('.media-type-tooltip').tooltip();
|
$('.media-type-tooltip').tooltip({ container: 'body' });
|
||||||
$('.thumb-tooltip').popover({
|
$('.thumb-tooltip').popover({
|
||||||
html: true,
|
html: true,
|
||||||
container: '#history-modal',
|
container: '#history-modal',
|
||||||
|
@@ -217,10 +217,10 @@ libraries_list_table_options = {
|
|||||||
$('#ajaxMsg').fadeOut();
|
$('#ajaxMsg').fadeOut();
|
||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
$('.purge-tooltip').tooltip();
|
$('.purge-tooltip').tooltip({ container: 'body' });
|
||||||
$('.edit-tooltip').tooltip();
|
$('.edit-tooltip').tooltip({ container: 'body' });
|
||||||
$('.transcode-tooltip').tooltip();
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
$('.media-type-tooltip').tooltip();
|
$('.media-type-tooltip').tooltip({ container: 'body' });
|
||||||
$('.thumb-tooltip').popover({
|
$('.thumb-tooltip').popover({
|
||||||
html: true,
|
html: true,
|
||||||
container: 'body',
|
container: 'body',
|
||||||
|
@@ -220,13 +220,14 @@ users_list_table_options = {
|
|||||||
$('#ajaxMsg').fadeOut();
|
$('#ajaxMsg').fadeOut();
|
||||||
|
|
||||||
// Create the tooltips.
|
// Create the tooltips.
|
||||||
$('.purge-tooltip').tooltip();
|
$('.purge-tooltip').tooltip({ container: 'body' });
|
||||||
$('.edit-tooltip').tooltip();
|
$('.edit-tooltip').tooltip({ container: 'body' });
|
||||||
$('.transcode-tooltip').tooltip();
|
$('.transcode-tooltip').tooltip({ container: 'body' });
|
||||||
$('.media-type-tooltip').tooltip();
|
$('.media-type-tooltip').tooltip({ container: 'body' });
|
||||||
$('.watched-tooltip').tooltip();
|
$('.watched-tooltip').tooltip({ container: 'body' });
|
||||||
$('.thumb-tooltip').popover({
|
$('.thumb-tooltip').popover({
|
||||||
html: true,
|
html: true,
|
||||||
|
container: 'body',
|
||||||
trigger: 'hover',
|
trigger: 'hover',
|
||||||
placement: 'right',
|
placement: 'right',
|
||||||
template: '<div class="popover history-thumbnail-popover" role="tooltip"><div class="arrow" style="top: 50%;"></div><div class="popover-content"></div></div>',
|
template: '<div class="popover history-thumbnail-popover" role="tooltip"><div class="arrow" style="top: 50%;"></div><div class="popover-content"></div></div>',
|
||||||
|
@@ -434,7 +434,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="http_proxy http-settings" id="http_proxy" value="1" ${config['http_proxy']}> Enable HTTP Proxy
|
<input type="checkbox" class="http-settings" name="http_proxy" id="http_proxy" value="1" ${config['http_proxy']}> Enable HTTP Proxy
|
||||||
</label>
|
</label>
|
||||||
<p class="help-block">Respect the X-Forwarded-Proto header. Used for reverse proxies with SSL.</p>
|
<p class="help-block">Respect the X-Forwarded-Proto header. Used for reverse proxies with SSL.</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -528,10 +528,17 @@
|
|||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="http_hash_password" id="http_hash_password" value="1" ${config['http_hash_password']} data-parsley-trigger="change"> Hash Password in the Config File
|
<input type="checkbox" name="http_hash_password" id="http_hash_password" value="1" ${config['http_hash_password']} data-parsley-trigger="change"> Hash Password in the Config File
|
||||||
</label>
|
</label>
|
||||||
|
<span id="hashPasswordCheck" style="color: #eb8600; padding-left: 10px;"></span>
|
||||||
<p class="help-block">Store a hashed password in the config file.<br />Warning: Your password cannot be recovered if forgotten!</p>
|
<p class="help-block">Store a hashed password in the config file.<br />Warning: Your password cannot be recovered if forgotten!</p>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" id="http_hashed_password" name="http_hashed_password" value="${config['http_hashed_password']}" style="display: none;" data-parsley-trigger="change" data-parsley-type="integer" data-parsley-range="[0, 1]"
|
<input type="text" id="http_hashed_password" name="http_hashed_password" value="${config['http_hashed_password']}" style="display: none;" data-parsley-trigger="change" data-parsley-type="integer" data-parsley-range="[0, 1]"
|
||||||
data-parsley-errors-container="#http_hash_password_error" data-parsley-error-message="Cannot un-hash password, please set a new password." data-parsley-no-focus required>
|
data-parsley-errors-container="#http_hash_password_error" data-parsley-error-message="Cannot un-hash password, please set a new password." data-parsley-no-focus required>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" class="auth-settings" name="http_basic_auth" id="http_basic_auth" value="1" ${config['http_basic_auth']} data-parsley-trigger="change"> Use Basic Authentication
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Use basic HTTP authentication instead of the HTML login form.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="padded-header">
|
<div class="padded-header">
|
||||||
@@ -566,7 +573,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block">Current API key: <strong><br/>${config['api_key']}</strong></p>
|
<p class="help-block">Current API key: <strong> ${config['api_key']}</strong></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p><input type="button" class="btn btn-bright save-button" value="Save" data-success="Changes saved successfully"></p>
|
<p><input type="button" class="btn btn-bright save-button" value="Save" data-success="Changes saved successfully"></p>
|
||||||
@@ -2570,7 +2577,11 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function allowGuestAccessCheck () {
|
function allowGuestAccessCheck () {
|
||||||
if ($('#http_username').val() == '' || $('#http_password').val() == '') {
|
if ($("#http_basic_auth").is(":checked")) {
|
||||||
|
$("#allow_guest_access").attr("disabled", true);
|
||||||
|
$("#allow_guest_access").attr("checked", false);
|
||||||
|
$("#allowGuestCheck").html("Guest access cannot be enabled with basic authentication.");
|
||||||
|
} else if ($('#http_username').val() == '' || $('#http_password').val() == '') {
|
||||||
$("#allow_guest_access").attr("disabled", true);
|
$("#allow_guest_access").attr("disabled", true);
|
||||||
$("#allow_guest_access").attr("checked", false);
|
$("#allow_guest_access").attr("checked", false);
|
||||||
$("#allowGuestCheck").html("You must set an admin password above to allow guest access.");
|
$("#allowGuestCheck").html("You must set an admin password above to allow guest access.");
|
||||||
@@ -2581,18 +2592,30 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
allowGuestAccessCheck();
|
allowGuestAccessCheck();
|
||||||
|
|
||||||
$('#http_username, #http_password').change(function () {
|
$('#http_username, #http_password, #http_basic_auth').change(function () {
|
||||||
allowGuestAccessCheck();
|
allowGuestAccessCheck();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function hashPasswordCheck () {
|
||||||
$("#http_hash_password").click(function(){
|
if ($("#http_basic_auth").is(":checked")) {
|
||||||
|
$("#http_hash_password").attr("checked", false);
|
||||||
|
$("#http_hash_password").attr("disabled", true);
|
||||||
|
$("#hashPasswordCheck").html("Password cannot be hashed with basic authentication.");
|
||||||
|
} else {
|
||||||
|
$("#http_hash_password").attr("disabled", false);
|
||||||
|
$("#hashPasswordCheck").html("");
|
||||||
|
}
|
||||||
if (!($("#http_hash_password").is(":checked")) && $("#http_hashed_password").val() == "1" && $("#http_password").val() == " ") {
|
if (!($("#http_hash_password").is(":checked")) && $("#http_hashed_password").val() == "1" && $("#http_password").val() == " ") {
|
||||||
$("#http_hashed_password").val(-1);
|
$("#http_hashed_password").val(-1);
|
||||||
} else if ($("#http_hash_password").is(":checked") && $("#http_hashed_password").val() == "-1" && $("#http_password").val() == " ") {
|
} else if ($("#http_hash_password").is(":checked") && $("#http_hashed_password").val() == "-1" && $("#http_password").val() == " ") {
|
||||||
$("#http_hashed_password").val(1);
|
$("#http_hashed_password").val(1);
|
||||||
$("#http_hash_password_error").html("");
|
$("#http_hash_password_error").html("");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
hashPasswordCheck();
|
||||||
|
|
||||||
|
$('#http_password, #http_hash_password, #http_basic_auth').change(function () {
|
||||||
|
hashPasswordCheck();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#http_password').change(function () {
|
$('#http_password').change(function () {
|
||||||
|
@@ -185,6 +185,7 @@ _CONFIG_DEFINITIONS = {
|
|||||||
'HTTPS_KEY': (str, 'General', ''),
|
'HTTPS_KEY': (str, 'General', ''),
|
||||||
'HTTPS_DOMAIN': (str, 'General', 'localhost'),
|
'HTTPS_DOMAIN': (str, 'General', 'localhost'),
|
||||||
'HTTPS_IP': (str, 'General', '127.0.0.1'),
|
'HTTPS_IP': (str, 'General', '127.0.0.1'),
|
||||||
|
'HTTP_BASIC_AUTH': (int, 'General', 0),
|
||||||
'HTTP_ENVIRONMENT': (str, 'General', 'production'),
|
'HTTP_ENVIRONMENT': (str, 'General', 'production'),
|
||||||
'HTTP_HASH_PASSWORD': (int, 'General', 0),
|
'HTTP_HASH_PASSWORD': (int, 'General', 0),
|
||||||
'HTTP_HASHED_PASSWORD': (int, 'General', 0),
|
'HTTP_HASHED_PASSWORD': (int, 'General', 0),
|
||||||
|
@@ -100,6 +100,7 @@ def extract_plexivity_xml(xml=None):
|
|||||||
video_resolution = helpers.get_xml_attr(c, 'videoResolution')
|
video_resolution = helpers.get_xml_attr(c, 'videoResolution')
|
||||||
width = helpers.get_xml_attr(c, 'width')
|
width = helpers.get_xml_attr(c, 'width')
|
||||||
|
|
||||||
|
ip_address = ''
|
||||||
machine_id = ''
|
machine_id = ''
|
||||||
platform = ''
|
platform = ''
|
||||||
player = ''
|
player = ''
|
||||||
|
@@ -108,7 +108,8 @@ def get_real_pms_url():
|
|||||||
|
|
||||||
if connections:
|
if connections:
|
||||||
# Get connection with matching address, otherwise return first connection
|
# Get connection with matching address, otherwise return first connection
|
||||||
conn = next((c for c in connections if c['address'] == plexpy.CONFIG.PMS_IP), connections[0])
|
conn = next((c for c in connections if c['address'] == plexpy.CONFIG.PMS_IP
|
||||||
|
and c['port'] == plexpy.CONFIG.PMS_PORT), connections[0])
|
||||||
plexpy.CONFIG.__setattr__('PMS_URL', conn['uri'])
|
plexpy.CONFIG.__setattr__('PMS_URL', conn['uri'])
|
||||||
plexpy.CONFIG.write()
|
plexpy.CONFIG.write()
|
||||||
logger.info(u"PlexPy PlexTV :: Server URL retrieved.")
|
logger.info(u"PlexPy PlexTV :: Server URL retrieved.")
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
|
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
import urllib2
|
import urllib
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
|
||||||
import plexpy
|
import plexpy
|
||||||
@@ -387,7 +387,7 @@ class PmsConnect(object):
|
|||||||
|
|
||||||
Output: array
|
Output: array
|
||||||
"""
|
"""
|
||||||
uri = '/search?query=' + urllib2.quote(query.encode('utf8')) + track
|
uri = '/search?query=' + urllib.quote(query.encode('utf8')) + track
|
||||||
request = self.request_handler.make_request(uri=uri,
|
request = self.request_handler.make_request(uri=uri,
|
||||||
proto=self.protocol,
|
proto=self.protocol,
|
||||||
request_type='GET',
|
request_type='GET',
|
||||||
@@ -1021,6 +1021,8 @@ class PmsConnect(object):
|
|||||||
session_output = self.get_session_each(session_type, session_)
|
session_output = self.get_session_each(session_type, session_)
|
||||||
session_list.append(session_output)
|
session_list.append(session_output)
|
||||||
|
|
||||||
|
session_list = sorted(session_list, key=lambda k: k['session_key'])
|
||||||
|
|
||||||
output = {'stream_count': helpers.get_xml_attr(xml_head[0], 'size'),
|
output = {'stream_count': helpers.get_xml_attr(xml_head[0], 'size'),
|
||||||
'sessions': session.mask_session_info(session_list)
|
'sessions': session.mask_session_info(session_list)
|
||||||
}
|
}
|
||||||
@@ -1902,10 +1904,12 @@ class PmsConnect(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if img:
|
if img:
|
||||||
uri = '/photo/:/transcode?url=http://127.0.0.1:32400%s' % img
|
params = {'url': plexpy.CONFIG.PMS_URL + img}
|
||||||
if width.isdigit() and height.isdigit():
|
if width.isdigit() and height.isdigit():
|
||||||
uri += '&width=%s&height=%s' % (width, height)
|
params['width'] = width
|
||||||
|
params['height'] = height
|
||||||
|
|
||||||
|
uri = '/photo/:/transcode?%s' % urllib.urlencode(params)
|
||||||
result = self.request_handler.make_request(uri=uri,
|
result = self.request_handler.make_request(uri=uri,
|
||||||
proto=self.protocol,
|
proto=self.protocol,
|
||||||
request_type='GET',
|
request_type='GET',
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
PLEXPY_VERSION = "master"
|
PLEXPY_VERSION = "master"
|
||||||
PLEXPY_RELEASE_VERSION = "1.4.1"
|
PLEXPY_RELEASE_VERSION = "1.4.4"
|
||||||
|
@@ -2247,6 +2247,7 @@ class WebInterface(object):
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
"allow_guest_access": checked(plexpy.CONFIG.ALLOW_GUEST_ACCESS),
|
"allow_guest_access": checked(plexpy.CONFIG.ALLOW_GUEST_ACCESS),
|
||||||
|
"http_basic_auth": checked(plexpy.CONFIG.HTTP_BASIC_AUTH),
|
||||||
"http_hash_password": checked(plexpy.CONFIG.HTTP_HASH_PASSWORD),
|
"http_hash_password": checked(plexpy.CONFIG.HTTP_HASH_PASSWORD),
|
||||||
"http_hashed_password": plexpy.CONFIG.HTTP_HASHED_PASSWORD,
|
"http_hashed_password": plexpy.CONFIG.HTTP_HASHED_PASSWORD,
|
||||||
"http_host": plexpy.CONFIG.HTTP_HOST,
|
"http_host": plexpy.CONFIG.HTTP_HOST,
|
||||||
@@ -2367,7 +2368,7 @@ class WebInterface(object):
|
|||||||
"ip_logging_enable", "movie_logging_enable", "tv_logging_enable", "music_logging_enable",
|
"ip_logging_enable", "movie_logging_enable", "tv_logging_enable", "music_logging_enable",
|
||||||
"notify_consecutive", "notify_upload_posters", "notify_recently_added", "notify_recently_added_grandparent",
|
"notify_consecutive", "notify_upload_posters", "notify_recently_added", "notify_recently_added_grandparent",
|
||||||
"monitor_pms_updates", "monitor_remote_access", "get_file_sizes", "log_blacklist", "http_hash_password",
|
"monitor_pms_updates", "monitor_remote_access", "get_file_sizes", "log_blacklist", "http_hash_password",
|
||||||
"allow_guest_access", "cache_images", "http_proxy"
|
"allow_guest_access", "cache_images", "http_proxy", "http_basic_auth"
|
||||||
]
|
]
|
||||||
for checked_config in checked_configs:
|
for checked_config in checked_configs:
|
||||||
if checked_config not in kwargs:
|
if checked_config not in kwargs:
|
||||||
|
@@ -66,10 +66,15 @@ def initialize(options):
|
|||||||
|
|
||||||
if options['http_password']:
|
if options['http_password']:
|
||||||
logger.info(u"PlexPy WebStart :: Web server authentication is enabled, username is '%s'", options['http_username'])
|
logger.info(u"PlexPy WebStart :: Web server authentication is enabled, username is '%s'", options['http_username'])
|
||||||
options_dict['tools.sessions.on'] = auth_enabled = session_enabled = True
|
if options['http_basic_auth']:
|
||||||
cherrypy.tools.auth = cherrypy.Tool('before_handler', webauth.check_auth)
|
auth_enabled = session_enabled = False
|
||||||
|
basic_auth_enabled = True
|
||||||
|
else:
|
||||||
|
options_dict['tools.sessions.on'] = auth_enabled = session_enabled = True
|
||||||
|
basic_auth_enabled = False
|
||||||
|
cherrypy.tools.auth = cherrypy.Tool('before_handler', webauth.check_auth)
|
||||||
else:
|
else:
|
||||||
auth_enabled = session_enabled = False
|
auth_enabled = session_enabled = basic_auth_enabled = False
|
||||||
|
|
||||||
if not options['http_root'] or options['http_root'] == '/':
|
if not options['http_root'] or options['http_root'] == '/':
|
||||||
plexpy.HTTP_ROOT = options['http_root'] = '/'
|
plexpy.HTTP_ROOT = options['http_root'] = '/'
|
||||||
@@ -88,7 +93,14 @@ def initialize(options):
|
|||||||
'application/javascript'],
|
'application/javascript'],
|
||||||
'tools.auth.on': auth_enabled,
|
'tools.auth.on': auth_enabled,
|
||||||
'tools.sessions.on': session_enabled,
|
'tools.sessions.on': session_enabled,
|
||||||
'tools.sessions.timeout': 30 * 24 * 60 # 30 days
|
'tools.sessions.timeout': 30 * 24 * 60, # 30 days
|
||||||
|
'tools.auth_basic.on': basic_auth_enabled,
|
||||||
|
'tools.auth_basic.realm': 'PlexPy web server',
|
||||||
|
'tools.auth_basic.checkpassword': cherrypy.lib.auth_basic.checkpassword_dict({
|
||||||
|
options['http_username']: options['http_password']})
|
||||||
|
},
|
||||||
|
'/api': {
|
||||||
|
'tools.auth_basic.on': False
|
||||||
},
|
},
|
||||||
'/interfaces': {
|
'/interfaces': {
|
||||||
'tools.staticdir.on': True,
|
'tools.staticdir.on': True,
|
||||||
@@ -199,7 +211,7 @@ def initialize(options):
|
|||||||
'tools.expires.secs': 60 * 60 * 24 * 30, # 30 days
|
'tools.expires.secs': 60 * 60 * 24 * 30, # 30 days
|
||||||
'tools.auth.on': False,
|
'tools.auth.on': False,
|
||||||
'tools.sessions.on': False
|
'tools.sessions.on': False
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prevent time-outs
|
# Prevent time-outs
|
||||||
|
Reference in New Issue
Block a user