Jump to content

get a list of active sessions


Recommended Posts

Posted

Is there a way with the API code to get a true list of active sessions such as those shown on the dashboard. I've been querying /Sessions but I get a lot more than what's listed in the dashboard.

 

Here is a small snippet

 

User: jacoblecesne
Device: Bedroom TV (AndroidTv)
State: DirectStream
Now Playing: Back to the Cold War (Video)
----------------------------------------
User: amythrash
Device: TiVo Stream 4K (AndroidTv)
State: DirectStream
Now Playing: Gruesome Golf Course (Video)
----------------------------------------
User: mitchellvernon
Device: TiVo Stream 4K (AndroidTv)
State: DirectPlay
Now Playing: The Lone Ranger (Video)
----------------------------------------
User: dwainmoore
Device: TiVo Stream 4K (AndroidTv)
State: DirectStream
Now Playing: No Good Horses (Video)
----------------------------------------
User: charleswilliams
Device: TiVo Stream 4K (AndroidTv)
State: DirectStream
Now Playing: A Thousand Little Trees of Blood (Video)
----------------------------------------
User: amythrash
Device: TiVo Stream 4K (AndroidTv)
State: Unknown State
Now Playing: Unknown Media (Unknown Type)
----------------------------------------
User: sarahouse
Device: TiVo Stream 4K (AndroidTv)
State: Unknown State
Now Playing: Unknown Media (Unknown Type)
----------------------------------------
User: andyschaefer
Device: TiVo Stream 4K (AndroidTv)
State: Unknown State
Now Playing: Unknown Media (Unknown Type)
 

darkassassin07
Posted

Pretty sure active devices includes anything connected to the server; even those that are just browsing currently.

 

You could filter that list after retrieving it from fhe API, to remove any item where Now Playing = Unknown Media

Posted

Try adding IsPlaying=true to your query.

Posted (edited)

ended up going a bit different route filtered on CanSeek: True and IsPaused: False for active sessions, and IsPaused: True for paused sessions.

Edited by jleiss

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...