From 979c85d751d7fd8978559f9843abc5780a30e83b Mon Sep 17 00:00:00 2001 From: Goldy <153996346+g0ldyy@users.noreply.github.com> Date: Wed, 27 Nov 2024 17:19:26 +0100 Subject: [PATCH] fix: shit fix before easydebrid new api --- comet/debrid/easydebrid.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/comet/debrid/easydebrid.py b/comet/debrid/easydebrid.py index 51a92c1..4ebf2dc 100644 --- a/comet/debrid/easydebrid.py +++ b/comet/debrid/easydebrid.py @@ -82,8 +82,11 @@ async def get_files(self, torrent_hashes, type, season, episode, kitsu): for index, (is_cached, hash) in enumerate(zip(responses, hashes)): if not is_cached: continue - - hash_files = filenames[str(index)] + + try: + hash_files = filenames[index] + except: + hash_files = filenames[str(index)] for filename in hash_files: if not is_video(filename): @@ -124,7 +127,10 @@ async def get_files(self, torrent_hashes, type, season, episode, kitsu): if not is_cached: continue - hash_files = filenames[index] + try: + hash_files = filenames[index] + except: + hash_files = filenames[str(index)] video_files = [f for f in hash_files if is_video(f)] if not video_files: