From e8ef2317ae814796a80e64a15fbbb411d07dacc9 Mon Sep 17 00:00:00 2001 From: Sebastien Bariteau Date: Fri, 29 Sep 2023 13:27:17 -0400 Subject: [PATCH] fix first run errors --- app/src/series.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/series.py b/app/src/series.py index 3843b1a..c35f3de 100644 --- a/app/src/series.py +++ b/app/src/series.py @@ -192,7 +192,10 @@ class Show: os.path.split(jf_ep["Path"].replace("\\", "/"))[0] )[-1] season_folder = os.path.join(base, channel_folder, expected_season) - os.makedirs(season_folder) + try: + os.makedirs(season_folder) + except FileExistsError: + pass self._wait_for_season(expected_season) return season_folder @@ -219,7 +222,7 @@ class Show: path: str = f"Shows/{series_id}/Seasons" all_seasons: dict = Jellyfin().get(path) - return [str(i.get("IndexNumber")) for i in all_seasons["Items"]] + return [str(i.get("Name")) for i in all_seasons["Items"]] def delete_folders(self, folders: list[str]) -> None: """delete temporary folders created"""