mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -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
|
@ -248,23 +248,23 @@ class WebInterface(object):
|
|||
@cherrypy.tools.json_out()
|
||||
@requireAuth(member_of("admin"))
|
||||
@addtoapi()
|
||||
def terminate_session(self, session_id=None, message=None, **kwargs):
|
||||
""" Add a new notification agent.
|
||||
def terminate_session(self, session_key=None, session_id=None, message=None, **kwargs):
|
||||
""" Stop a streaming session.
|
||||
|
||||
```
|
||||
Required parameters:
|
||||
session_id (str): The id of the session to terminate
|
||||
message (str): A custom message to send to the client
|
||||
session_key (int): The session key of the session to terminate, OR
|
||||
session_id (str): The session id of the session to terminate
|
||||
|
||||
Optional parameters:
|
||||
None
|
||||
message (str): A custom message to send to the client
|
||||
|
||||
Returns:
|
||||
None
|
||||
```
|
||||
"""
|
||||
pms_connect = pmsconnect.PmsConnect()
|
||||
result = pms_connect.terminate_session(session_id=session_id, message=message)
|
||||
result = pms_connect.terminate_session(session_key=session_key, session_id=session_id, message=message)
|
||||
|
||||
if result:
|
||||
return {'result': 'success', 'message': 'Session terminated.'}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue