diff --git a/pyproject.toml b/pyproject.toml index 8ff246a..b90cf2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ license = "MIT" name = "x" # can't leave empty because of bug with `poetry install` from poetry.lock file readme = "readme.md" repository = "https://github.com/9-FS/2022-10-23-nHentai-to-PDF-Server" -version = "3.0.1" +version = "3.0.2" [tool.poetry.dependencies] kfsconfig = "^1.0.0" diff --git a/src/Hentai.py b/src/Hentai.py index f10841e..fc5af18 100644 --- a/src/Hentai.py +++ b/src/Hentai.py @@ -97,7 +97,8 @@ def _get_gallery(cls, nhentai_ID: int, cookies: dict[str, str], headers: dict[st elif os.path.isfile(gallery_list_filepath)==True: # if gallery could not be loaded from class variable and appropiate galleries file exists: try to load from file with open(gallery_list_filepath, "rt") as galleries_file: try: - cls.galleries[nhentai_ID//cls.GALLERIES_SPLIT]=json.loads(galleries_file.read()) # load already downloaded galleries, overwrite class variable + cls.galleries[nhentai_ID//cls.GALLERIES_SPLIT]=json.loads(galleries_file.read()) # load already downloaded galleries, overwrite or create entry class variable + cls.galleries_modified[nhentai_ID//cls.GALLERIES_SPLIT]=False # overwrite or create netry in modified variable, galleries have not been modified, don't save during next save turn except ValueError as e: # if file is corrupted: logging.critical(f"Parsing galleries from \"{gallery_list_filepath}\" failed with {KFSfstr.full_class_name(e)}. Check it for errors.") raise RuntimeError(f"Error in {Hentai._get_gallery.__name__}{inspect.signature(Hentai._get_gallery)}: Parsing galleries from \"{gallery_list_filepath}\" failed with {KFSfstr.full_class_name(e)}. Check it for errors.") from e