Skip to content

Commit

Permalink
fix: oupsie
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Nov 18, 2024
1 parent 5266670 commit 43b7e37
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions comet/api/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,25 +475,22 @@ async def stream(request: Request, b64config: str, type: str, id: str):
}
)

for hash, hash_data in sorted_ranked_files.items():
for resolution, hash_list in balanced_hashes.items():
if hash in hash_list:
data = hash_data["data"]
results.append(
{
"name": f"[{debrid_extension}⚡] Comet {data['resolution']}",
"description": format_title(data, config),
"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,
},
}
)

continue
for resolution in balanced_hashes:
for hash in balanced_hashes[resolution]:
data = sorted_ranked_files[hash]["data"]
results.append(
{
"name": f"[{debrid_extension}⚡] Comet {data['resolution']}",
"description": format_title(data, config),
"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,
},
}
)

return {"streams": results}

Expand Down

0 comments on commit 43b7e37

Please sign in to comment.