Update session database with all session data

This commit is contained in:
JonnyWong16 2017-12-16 09:08:17 -08:00
parent 1b0c32f4e7
commit c586fe1d07

View file

@ -223,10 +223,11 @@ class ActivityHandler(object):
if this_key == last_key: if this_key == last_key:
# Update the session state and viewOffset # Update the session state and viewOffset
if this_state == 'playing': if this_state == 'playing':
ap.set_session_state(session_key=self.get_session_key(), # Update the session in our temp session table
state=this_state, session = self.get_live_session()
view_offset=self.timeline['viewOffset'], if session:
stopped=int(time.time())) self.update_db_session(session=session)
# Start our state checks # Start our state checks
if this_state != last_state: if this_state != last_state:
if this_state == 'paused': if this_state == 'paused':