diff --git a/cartridges/details_dialog.py b/cartridges/details_dialog.py index 98c27d5a..0677199e 100644 --- a/cartridges/details_dialog.py +++ b/cartridges/details_dialog.py @@ -302,7 +302,7 @@ def thread_func() -> None: with Image.open(path) as image: if getattr(image, "is_animated", False): new_path = convert_cover(path) - except UnidentifiedImageError: + except (UnidentifiedImageError, OSError, ValueError): pass if new_path: diff --git a/cartridges/utils/save_cover.py b/cartridges/utils/save_cover.py index ac3fb92a..29d2d849 100644 --- a/cartridges/utils/save_cover.py +++ b/cartridges/utils/save_cover.py @@ -63,7 +63,7 @@ def convert_cover( if shared.schema.get_boolean("high-quality-images") else shared.TIFF_COMPRESSION, ) - except UnidentifiedImageError: + except (UnidentifiedImageError, OSError, ValueError): try: Gdk.Texture.new_from_filename(str(cover_path)).save_to_tiff( tmp_path := Gio.File.new_tmp("XXXXXX.tiff")[0].get_path()