Add support for commercial marker triggers

This commit is contained in:
JonnyWong16 2023-02-17 10:01:57 -08:00
parent 32bb98e8c1
commit 6b0b3a476f
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
5 changed files with 36 additions and 8 deletions

View file

@ -661,8 +661,12 @@ class ActivityProcessor(object):
[session['write_attempts'] + 1, session_key])
def set_marker(self, session_key=None, marker_idx=None, marker_type=None):
marker_args = [int(marker_type == 'intro'), int(marker_type == 'credits')]
self.db.action('UPDATE sessions SET intro = ?, credits = ?, marker = ? '
marker_args = [
int(marker_type == 'intro'),
int(marker_type == 'commercial'),
int(marker_type == 'credits')
]
self.db.action('UPDATE sessions SET intro = ?, commercial = ?, credits = ?, marker = ? '
'WHERE session_key = ?',
marker_args + [marker_idx, session_key])