From 1147845640a628bda61e0355f186d425587cb989 Mon Sep 17 00:00:00 2001 From: Goldy <153996346+g0ldyy@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:51:59 +0200 Subject: [PATCH] feat: autplay --- comet/api/stream.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/comet/api/stream.py b/comet/api/stream.py index 3425323..9d2e2eb 100644 --- a/comet/api/stream.py +++ b/comet/api/stream.py @@ -183,6 +183,10 @@ async def stream(request: Request, b64config: str, type: str, id: str): else None ), "url": f"{request.url.scheme}://{request.url.netloc}/{b64config}/playback/{hash}/{data['index']}", + "behaviorHints": { + "filename": data["raw_title"], + "bingeGroup": "comet|" + hash, + }, } ) @@ -420,6 +424,10 @@ async def stream(request: Request, b64config: str, type: str, id: str): "torrentTitle": data["torrent_title"], "torrentSize": data["torrent_size"], "url": f"{request.url.scheme}://{request.url.netloc}/{b64config}/playback/{hash}/{data['index']}", + "behaviorHints": { + "filename": data["raw_title"], + "bingeGroup": "comet|" + hash, + }, } )