Fix broken history logging.
This commit is contained in:
@@ -151,9 +151,7 @@ def check_active_sessions():
|
|||||||
kwargs=dict(stream_data=stream, notify_action='stop')).start()
|
kwargs=dict(stream_data=stream, notify_action='stop')).start()
|
||||||
|
|
||||||
# Write the item history on playback stop
|
# Write the item history on playback stop
|
||||||
# Just make sure that the ratingKey is indeed an integer
|
monitor_process.write_session_history(session=stream)
|
||||||
if stream['rating_key'].isdigit():
|
|
||||||
monitor_process.write_session_history(session=stream)
|
|
||||||
|
|
||||||
# Process the newly received session data
|
# Process the newly received session data
|
||||||
for session in media_container:
|
for session in media_container:
|
||||||
@@ -249,10 +247,10 @@ class MonitorProcessing(object):
|
|||||||
else:
|
else:
|
||||||
stopped = int(time.time())
|
stopped = int(time.time())
|
||||||
|
|
||||||
if plexpy.CONFIG.VIDEO_LOGGING_ENABLE and \
|
if plexpy.CONFIG.VIDEO_LOGGING_ENABLE and str(session['rating_key']).isdigit() and \
|
||||||
(session['media_type'] == 'movie' or session['media_type'] == 'episode'):
|
(session['media_type'] == 'movie' or session['media_type'] == 'episode'):
|
||||||
logging_enabled = True
|
logging_enabled = True
|
||||||
elif plexpy.CONFIG.MUSIC_LOGGING_ENABLE and \
|
elif plexpy.CONFIG.MUSIC_LOGGING_ENABLE and str(session['rating_key']).isdigit() and \
|
||||||
session['media_type'] == 'track':
|
session['media_type'] == 'track':
|
||||||
logging_enabled = True
|
logging_enabled = True
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user