diff --git a/WebStreamer/server/stream_routes.py b/WebStreamer/server/stream_routes.py index 7db4bd7..2634c49 100644 --- a/WebStreamer/server/stream_routes.py +++ b/WebStreamer/server/stream_routes.py @@ -34,6 +34,17 @@ async def root_route_handler(request): } ) +@routes.get("/session", allow_head=True) +async def root_route_handler(request): + clint={} + for _, x in multi_clients.items(): + conn={} + for session in x.media_sessions: + if session: + conn[session.dc_id()]=session.is_started.is_set() + clint[x.username]=conn + return web.json_response(clint) + @routes.get("/dl/{path}", allow_head=True) async def stream_handler(request: web.Request): try: