diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index c87e6acaa..ba6d1add8 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.0.42" +__version__ = "5.0.43" diff --git a/cyberdrop_dl/utils/sorting.py b/cyberdrop_dl/utils/sorting.py index 964e8896b..5debb4959 100644 --- a/cyberdrop_dl/utils/sorting.py +++ b/cyberdrop_dl/utils/sorting.py @@ -3,6 +3,7 @@ from pathlib import Path from typing import TYPE_CHECKING +import PIL from PIL import Image from videoprops import get_audio_properties, get_video_properties @@ -105,15 +106,13 @@ async def sort_image(self, file: Path, base_name: str) -> None: """Sorts an image file into the sorted image folder""" self.image_count += 1 - if ".gif" in file.suffix.lower(): - await self.sort_other(file, base_name) - self.other_count -= 1 - return - - image = Image.open(file) - width, height = image.size - resolution = f"{width}x{height}" - image.close() + try: + image = Image.open(file) + width, height = image.size + resolution = f"{width}x{height}" + image.close() + except PIL.UnidentifiedImageError: + resolution = "Unknown" parent_name = file.parent.name filename, ext = file.stem, file.suffix diff --git a/pyproject.toml b/pyproject.toml index 3c8e635e1..cf8a4aeb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.0.42" +version = "5.0.43" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"