mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Add session_id parameter to get_activity API command
This commit is contained in:
parent
87dd43d699
commit
505b6b616e
2 changed files with 7 additions and 3 deletions
3
API.md
3
API.md
|
@ -360,7 +360,8 @@ Required parameters:
|
||||||
None
|
None
|
||||||
|
|
||||||
Optional parameters:
|
Optional parameters:
|
||||||
None
|
session_key (int): Session key for the session info to return, OR
|
||||||
|
session_id (str): Session ID for the session info to return
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
json:
|
json:
|
||||||
|
|
|
@ -4906,7 +4906,7 @@ class WebInterface(object):
|
||||||
@cherrypy.tools.json_out()
|
@cherrypy.tools.json_out()
|
||||||
@requireAuth()
|
@requireAuth()
|
||||||
@addtoapi()
|
@addtoapi()
|
||||||
def get_activity(self, session_key=None, **kwargs):
|
def get_activity(self, session_key=None, session_id=None, **kwargs):
|
||||||
""" Get the current activity on the PMS.
|
""" Get the current activity on the PMS.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -4914,7 +4914,8 @@ class WebInterface(object):
|
||||||
None
|
None
|
||||||
|
|
||||||
Optional parameters:
|
Optional parameters:
|
||||||
None
|
session_key (int): Session key for the session info to return, OR
|
||||||
|
session_id (str): Session ID for the session info to return
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
json:
|
json:
|
||||||
|
@ -5145,6 +5146,8 @@ class WebInterface(object):
|
||||||
if result:
|
if result:
|
||||||
if session_key:
|
if session_key:
|
||||||
return next((s for s in result['sessions'] if s['session_key'] == session_key), {})
|
return next((s for s in result['sessions'] if s['session_key'] == session_key), {})
|
||||||
|
if session_id:
|
||||||
|
return next((s for s in result['sessions'] if s['session_id'] == session_id), {})
|
||||||
|
|
||||||
counts = {'stream_count_direct_play': 0,
|
counts = {'stream_count_direct_play': 0,
|
||||||
'stream_count_direct_stream': 0,
|
'stream_count_direct_stream': 0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue