JonnyWong16/plexpy

More stream stats in get_activity api call

Drewster727 asked for this feature 10 months ago — 2 comments

Drewster727 commented 10 months ago

Hi,

I'm utilizing the API for a small project... I am calling the "get_activity" command: http://<url>/api/v2?apikey=<apikey>&cmd=get_activity

I'm getting the following...

"response": {
"message": null,
"data": {
"stream_count": "20",
"sessions": [ ... ]
...

I'd like to be able to also get that count broken up by type: direct and transcode. i.e.....

"response": {
"message": null,
"data": {
"stream_count": "20",
"directplay_stream_count: "5",
"transcode_stream_count: "15",
"sessions": [ ... ]
...

I can do this by checking the streams, but I'd like to pull exactly what the plexpy UI is pulling at the top of the page.

Should be an easy one I hope!

Thanks

JonnyWong16 commented 10 months ago Admin

The header in PlexPy just checks the streams and totals it up. https://github.com/drzoidberg33/plexpy/blob/master/plexpy/webserve.py#L257-L275

Join the discussion!

Sign-in with GitHub to comment