Skip to content

Commit

Permalink
new route
Browse files Browse the repository at this point in the history
  • Loading branch information
DeekshithSH committed May 11, 2024
1 parent e387b0c commit 25f8b35
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions WebStreamer/server/stream_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 25f8b35

Please sign in to comment.