diff --git a/plexpy/activity_processor.py b/plexpy/activity_processor.py index c821d23d..dcd1f138 100644 --- a/plexpy/activity_processor.py +++ b/plexpy/activity_processor.py @@ -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 = ? '