mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 12:59:42 -07:00
Fix broken history logging.
This commit is contained in:
parent
e445228b8a
commit
7994351644
1 changed files with 3 additions and 5 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue