mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Simplify set marker in database
This commit is contained in:
parent
599c54c9e1
commit
7cc78d448d
1 changed files with 2 additions and 7 deletions
|
@ -661,15 +661,10 @@ class ActivityProcessor(object):
|
|||
[session['write_attempts'] + 1, session_key])
|
||||
|
||||
def set_marker(self, session_key=None, marker_idx=None, marker_type=None):
|
||||
if marker_type == 'intro':
|
||||
args = [1, 0]
|
||||
elif marker_type == 'credits':
|
||||
args = [0, 1]
|
||||
else:
|
||||
args = [0, 0]
|
||||
marker_args = [int(marker_type == 'intro'), int(marker_type == 'credits')]
|
||||
self.db.action('UPDATE sessions SET intro = ?, credits = ?, marker = ? '
|
||||
'WHERE session_key = ?',
|
||||
args + [marker_idx, session_key])
|
||||
marker_args + [marker_idx, session_key])
|
||||
|
||||
def set_watched(self, session_key=None):
|
||||
self.db.action('UPDATE sessions SET watched = ? '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue