Fix write session to history only if library item

Some channel items, specifically Apple movie trailers, are counted as
movie items. Make sure the rating_key is a number to filter these out.
This commit is contained in:
Jonathan Wong 2015-09-10 21:30:34 -07:00
parent e30e6dfe35
commit a43efef28a

View file

@ -151,7 +151,9 @@ def check_active_sessions():
kwargs=dict(stream_data=stream, notify_action='stop')).start()
# Write the item history on playback stop
monitor_process.write_session_history(session=stream)
# Just make sure that the ratingKey is indeed an integer
if stream['rating_key'].isdigit():
monitor_process.write_session_history(session=stream)
# Process the newly received session data
for session in media_container: