From 8620bce8b4740f52e0a01821c01d04cbdce36922 Mon Sep 17 00:00:00 2001 From: Goldy <153996346+g0ldyy@users.noreply.github.com> Date: Wed, 19 Feb 2025 23:45:14 +0100 Subject: [PATCH] fix: playback proxy with postgre --- comet/debrid/stremthru.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/comet/debrid/stremthru.py b/comet/debrid/stremthru.py index 832436b..948fdc2 100644 --- a/comet/debrid/stremthru.py +++ b/comet/debrid/stremthru.py @@ -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 @@ -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 @@ -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,