Compare commits

...

5 Commits

Author SHA1 Message Date
JonnyWong16
86a9230da8 v1.4.14 2016-10-12 21:06:34 -07:00
JonnyWong16
86f84766c1 Allow disable script timeout 2016-10-12 21:00:52 -07:00
JonnyWong16
fdc7078e5c API key readonly instead of disabled 2016-10-12 20:55:32 -07:00
JonnyWong16
c649ebfcc0 Fix typo under Flush Temporary Sessions 2016-10-10 22:47:41 -07:00
JonnyWong16
6aa0d4cd0b Check for metadata before attempting to write session history 2016-10-10 22:46:48 -07:00
6 changed files with 25 additions and 10 deletions

View File

@@ -1,5 +1,13 @@
# Changelog # Changelog
## v1.4.14 (2016-10-12)
* Fix: History logging locking up if media is removed from Plex before PlexPy can save the session.
* Fix: Unable to save API key in the settings.
* Fix: Some typos in the settings. (Thanks @Leafar3456)
* Change: Disable script timeout by setting timeout to 0 seconds.
## v1.4.13 (2016-10-08) ## v1.4.13 (2016-10-08)
* New: Option to set the number of days to keep PlexPy backups. * New: Option to set the number of days to keep PlexPy backups.

View File

@@ -3059,6 +3059,9 @@ a:hover .overlay-refresh-image:hover {
#plex-log-levels label { #plex-log-levels label {
margin-bottom: 0; margin-bottom: 0;
} }
#api_key.form-control[disabled] { #api_key.form-control[readonly] {
background-color: #555; background-color: #555;
} }
#api_key.form-control[readonly]:focus {
background-color: #fff;
}

View File

@@ -541,7 +541,7 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="input-group"> <div class="input-group">
<input class="form-control" type="text" name="api_key" id="api_key" value="${config['api_key']}" size="20" disabled> <input class="form-control" type="text" name="api_key" id="api_key" value="${config['api_key']}" size="20" readonly>
<span class="input-group-btn"> <span class="input-group-btn">
<button class="btn btn-form" type="button" id="generate_api">Generate</button> <button class="btn btn-form" type="button" id="generate_api">Generate</button>
</span> </span>
@@ -762,8 +762,8 @@
<div class="form-group"> <div class="form-group">
<label>Flush Temporary Sessions</label> <label>Flush Temporary Sessions</label>
<p class="help-block"> <p class="help-block">
Attempt to fix hisotry logging by flushing out all of the temporary sessions in the database.<br /> Attempt to fix history logging by flushing out all of the temporary sessions in the database.<br />
Warning: This will reset all currently active sessions. For emergeny use only when history logging is stuck! Warning: This will reset all currently active sessions. For emergency use only when history logging is stuck!
</p> </p>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">

View File

@@ -221,7 +221,7 @@ class ActivityProcessor(object):
logger.debug(u"PlexPy ActivityProcessor :: Fetching metadata for item ratingKey %s" % session['rating_key']) logger.debug(u"PlexPy ActivityProcessor :: Fetching metadata for item ratingKey %s" % session['rating_key'])
pms_connect = pmsconnect.PmsConnect() pms_connect = pmsconnect.PmsConnect()
result = pms_connect.get_metadata_details(rating_key=str(session['rating_key'])) result = pms_connect.get_metadata_details(rating_key=str(session['rating_key']))
if result: if result and result['metadata']:
metadata = result['metadata'] metadata = result['metadata']
else: else:
return False return False

View File

@@ -2207,13 +2207,17 @@ class Scripts(object):
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
cwd=self.script_folder) cwd=self.script_folder)
if self.script_timeout:
timer = threading.Timer(self.script_timeout, kill_script, (process,)) timer = threading.Timer(self.script_timeout, kill_script, (process,))
else:
timer = None
try: try:
timer.start() if timer: timer.start()
output, error = process.communicate() output, error = process.communicate()
status = process.returncode status = process.returncode
finally: finally:
timer.cancel() if timer: timer.cancel()
except OSError as e: except OSError as e:
logger.error(u"PlexPy Notifiers :: Failed to run script: %s" % e) logger.error(u"PlexPy Notifiers :: Failed to run script: %s" % e)
@@ -2420,7 +2424,7 @@ class Scripts(object):
{'label': 'Script Timeout', {'label': 'Script Timeout',
'value': self.script_timeout, 'value': self.script_timeout,
'name': 'scripts_timeout', 'name': 'scripts_timeout',
'description': 'The number of seconds to wait before killing the script.', 'description': 'The number of seconds to wait before killing the script. 0 to disable timeout.',
'input_type': 'number' 'input_type': 'number'
} }
] ]

View File

@@ -1,2 +1,2 @@
PLEXPY_VERSION = "master" PLEXPY_VERSION = "master"
PLEXPY_RELEASE_VERSION = "1.4.13" PLEXPY_RELEASE_VERSION = "1.4.14"