mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 14:10:52 -07:00
Fix session pause timestamp
This commit is contained in:
parent
98cfb50571
commit
c9436195f3
1 changed files with 2 additions and 2 deletions
|
@ -460,7 +460,7 @@ class ActivityProcessor(object):
|
|||
if str(session_key).isdigit():
|
||||
self.db.action('DELETE FROM sessions WHERE session_key = ?', [session_key])
|
||||
|
||||
def set_session_last_paused(self, session_key=None, timestamp=None ):
|
||||
def set_session_last_paused(self, session_key=None, timestamp=None):
|
||||
if str(session_key).isdigit():
|
||||
result = self.db.select('SELECT last_paused, paused_counter '
|
||||
'FROM sessions '
|
||||
|
@ -469,7 +469,7 @@ class ActivityProcessor(object):
|
|||
paused_counter = None
|
||||
for session in result:
|
||||
if session['last_paused']:
|
||||
paused_offset = timestamp - int(session['last_paused'])
|
||||
paused_offset = int(time.time()) - int(session['last_paused'])
|
||||
if session['paused_counter']:
|
||||
paused_counter = int(session['paused_counter']) + int(paused_offset)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue