mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 14:10:52 -07:00
Ability to stop a stream using session key
This commit is contained in:
parent
c18ee81130
commit
8c0bcd0059
6 changed files with 46 additions and 12 deletions
|
@ -34,6 +34,7 @@ class ActivityProcessor(object):
|
|||
def write_session(self, session=None, notify=True):
|
||||
if session:
|
||||
values = {'session_key': session.get('session_key', ''),
|
||||
'session_id': session.get('session_id', ''),
|
||||
'transcode_key': session.get('transcode_key', ''),
|
||||
'section_id': session.get('section_id', ''),
|
||||
'rating_key': session.get('rating_key', ''),
|
||||
|
@ -466,6 +467,16 @@ class ActivityProcessor(object):
|
|||
|
||||
return None
|
||||
|
||||
def get_session_by_id(self, session_id=None):
|
||||
if session_id:
|
||||
session = self.db.select_single('SELECT * FROM sessions '
|
||||
'WHERE session_id = ? ',
|
||||
args=[session_id])
|
||||
if session:
|
||||
return session
|
||||
|
||||
return None
|
||||
|
||||
def set_session_state(self, session_key=None, state=None, **kwargs):
|
||||
if str(session_key).isdigit():
|
||||
values = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue