Image cache now ignores corrupted image files

This commit is contained in:
DevilXD committed 2025-06-01 08:27:50 +02:00
1 parent 8d2ede89ca
commit a26b359687
1 file changed
+1 -1
+1 -1
View File
@@ -103,7 +103,7 @@ class ImageCache:
else:
try:
self._images[img_hash] = image = Image_module.open(CACHE_PATH / img_hash)
except FileNotFoundError:
except (FileNotFoundError, Image_module.UnidentifiedImageError):
pass
if image is None:
async with self._twitch.request("GET", url) as response: