Skip to content

Commit

Permalink
fix: playback proxy with postgre
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Feb 19, 2025
1 parent a98459e commit 8620bce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions comet/debrid/stremthru.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ async def generate_download_link(
filename = file["name"]
file_parsed = parse(filename)

file_season = file_parsed.seasons[0] if file_parsed.seasons else None
file_episode = file_parsed.episodes[0] if file_parsed.episodes else None
season = int(season) if season != "n" else None
episode = int(episode) if episode != "n" else None

if str(file["index"]) == index:
target_file = file
break
Expand All @@ -179,11 +184,6 @@ async def generate_download_link(
):
continue

file_season = file_parsed.seasons[0] if file_parsed.seasons else None
file_episode = file_parsed.episodes[0] if file_parsed.episodes else None
season = int(season) if season != "n" else None
episode = int(episode) if episode != "n" else None

if season == file_season and episode == file_episode:
target_file = file
break
Expand All @@ -201,7 +201,7 @@ async def generate_download_link(
{
"debrid_service": self.real_debrid_name,
"info_hash": hash,
"file_index": target_file["index"],
"file_index": str(target_file["index"]),
"title": target_file["name"],
"season": season,
"episode": episode,
Expand Down

0 comments on commit 8620bce

Please sign in to comment.