@@ -263,11 +263,12 @@ async def stream(
263
263
else ("⚡" if torrent ["cached" ] else "⬇️" )
264
264
)
265
265
266
+ torrent_title = torrent ["title" ]
266
267
the_stream = {
267
268
"name" : f"[{ debrid_extension } { debrid_emoji } ] Comet { rtn_data .resolution } " ,
268
269
"description" : format_title (
269
270
rtn_data ,
270
- torrent [ "title" ] ,
271
+ torrent_title ,
271
272
torrent ["seeders" ],
272
273
torrent ["size" ],
273
274
torrent ["tracker" ],
@@ -292,7 +293,7 @@ async def stream(
292
293
the_stream ["sources" ] = torrent ["sources" ]
293
294
else :
294
295
the_stream ["url" ] = (
295
- f"{ request .url .scheme } ://{ request .url .netloc } /{ b64config } /playback/{ info_hash } /{ torrent ['fileIndex' ] if torrent ['cached' ] and torrent ['fileIndex' ] is not None else 'n' } /{ title } /{ result_season } /{ result_episode } "
296
+ f"{ request .url .scheme } ://{ request .url .netloc } /{ b64config } /playback/{ info_hash } /{ torrent ['fileIndex' ] if torrent ['cached' ] and torrent ['fileIndex' ] is not None else 'n' } /{ title } /{ result_season } /{ result_episode } / { torrent_title } "
296
297
)
297
298
298
299
if torrent ["cached" ]:
@@ -303,7 +304,7 @@ async def stream(
303
304
return {"streams" : cached_results + non_cached_results }
304
305
305
306
306
- @streams .get ("/{b64config}/playback/{hash}/{index}/{name}/{season}/{episode}" )
307
+ @streams .get ("/{b64config}/playback/{hash}/{index}/{name}/{season}/{episode}/{torrent_name} " )
307
308
async def playback (
308
309
request : Request ,
309
310
b64config : str ,
@@ -312,10 +313,9 @@ async def playback(
312
313
name : str ,
313
314
season : str ,
314
315
episode : str ,
316
+ torrent_name : str
315
317
):
316
318
config = config_check (b64config )
317
- # if not config:
318
- # return FileResponse("comet/assets/invalidconfig.mp4")
319
319
320
320
season = int (season ) if season != "n" else None
321
321
episode = int (episode ) if episode != "n" else None
@@ -361,7 +361,7 @@ async def playback(
361
361
ip if not should_proxy else "" ,
362
362
)
363
363
download_url = await debrid .generate_download_link (
364
- hash , index , name , season , episode
364
+ hash , index , name , torrent_name , season , episode
365
365
)
366
366
if not download_url :
367
367
return FileResponse ("comet/assets/uncached.mp4" )
0 commit comments