mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 09:42:57 -07:00
Fix for null paused_counter issue.
This commit is contained in:
parent
8fca6352cf
commit
6103d14a6f
1 changed files with 4 additions and 1 deletions
|
@ -354,7 +354,10 @@ class ActivityProcessor(object):
|
||||||
for session in result:
|
for session in result:
|
||||||
if session['last_paused']:
|
if session['last_paused']:
|
||||||
paused_offset = int(time.time()) - int(session['last_paused'])
|
paused_offset = int(time.time()) - int(session['last_paused'])
|
||||||
paused_counter = int(session['paused_counter']) + int(paused_offset)
|
if session['paused_counter']:
|
||||||
|
paused_counter = int(session['paused_counter']) + int(paused_offset)
|
||||||
|
else:
|
||||||
|
paused_counter = int(paused_offset)
|
||||||
|
|
||||||
values = {'state': 'playing',
|
values = {'state': 'playing',
|
||||||
'last_paused': timestamp
|
'last_paused': timestamp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue