Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
try except for image sorting.
Jules-WinnfieldX4b3a9022b5f3
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.pyindex 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.pyindex 964e8896b..5debb4959 100644--- a/cyberdrop_dl/utils/sorting.py+++ b/cyberdrop_dl/utils/sorting.py@@ -3,6 +3,7 @@ import itertoolsfrom pathlib import Pathfrom typing import TYPE_CHECKING+import PILfrom PIL import Imagefrom videoprops import get_audio_properties, get_video_properties@@ -105,15 +106,13 @@ class Sorter:"""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.namefilename, ext = file.stem, file.suffixdiff --git a/pyproject.toml b/pyproject.tomlindex 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 <[email protected]>"]readme = "README.md"