@@ -475,25 +475,22 @@ async def stream(request: Request, b64config: str, type: str, id: str):
475
475
}
476
476
)
477
477
478
- for hash , hash_data in sorted_ranked_files .items ():
479
- for resolution , hash_list in balanced_hashes .items ():
480
- if hash in hash_list :
481
- data = hash_data ["data" ]
482
- results .append (
483
- {
484
- "name" : f"[{ debrid_extension } ⚡] Comet { data ['resolution' ]} " ,
485
- "description" : format_title (data , config ),
486
- "torrentTitle" : data ["torrent_title" ],
487
- "torrentSize" : data ["torrent_size" ],
488
- "url" : f"{ request .url .scheme } ://{ request .url .netloc } /{ b64config } /playback/{ hash } /{ data ['index' ]} " ,
489
- "behaviorHints" : {
490
- "filename" : data ["raw_title" ],
491
- "bingeGroup" : "comet|" + hash ,
492
- },
493
- }
494
- )
495
-
496
- continue
478
+ for resolution in balanced_hashes :
479
+ for hash in balanced_hashes [resolution ]:
480
+ data = sorted_ranked_files [hash ]["data" ]
481
+ results .append (
482
+ {
483
+ "name" : f"[{ debrid_extension } ⚡] Comet { data ['resolution' ]} " ,
484
+ "description" : format_title (data , config ),
485
+ "torrentTitle" : data ["torrent_title" ],
486
+ "torrentSize" : data ["torrent_size" ],
487
+ "url" : f"{ request .url .scheme } ://{ request .url .netloc } /{ b64config } /playback/{ hash } /{ data ['index' ]} " ,
488
+ "behaviorHints" : {
489
+ "filename" : data ["raw_title" ],
490
+ "bingeGroup" : "comet|" + hash ,
491
+ },
492
+ }
493
+ )
497
494
498
495
return {"streams" : results }
499
496
0 commit comments