Monitor stream intro/credits marker activity

This commit is contained in:
JonnyWong16 2023-02-16 11:29:47 -08:00
parent a8539b2927
commit 9a152932ee
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 226 additions and 181 deletions

View file

@ -660,8 +660,18 @@ class ActivityProcessor(object):
self.db.action('UPDATE sessions SET write_attempts = ? WHERE session_key = ?',
[session['write_attempts'] + 1, session_key])
def set_intro(self, session_key=None):
self.db.action('UPDATE sessions SET intro = intro + 1 '
'WHERE session_key = ?',
[session_key])
def set_credits(self, session_key=None):
self.db.action('UPDATE sessions SET credits = credits + 1 '
'WHERE session_key = ?',
[session_key])
def set_watched(self, session_key=None):
self.db.action('UPDATE sessions SET watched = ?'
self.db.action('UPDATE sessions SET watched = ? '
'WHERE session_key = ?',
[1, session_key])