mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-01-31 07:10:45 +00:00
Add ".psd" to IMAGE_TYPES; Handle ID3NoHeaderError
This commit is contained in:
@@ -33,6 +33,7 @@ IMAGE_TYPES: list[str] = [
|
||||
".jp2",
|
||||
".j2k",
|
||||
".jpg2",
|
||||
".psd",
|
||||
]
|
||||
RAW_IMAGE_TYPES: list[str] = [
|
||||
".raw",
|
||||
|
||||
@@ -358,7 +358,7 @@ class ItemThumb(FlowWidget):
|
||||
def set_extension(self, ext: str) -> None:
|
||||
if ext and ext.startswith(".") is False:
|
||||
ext = "." + ext
|
||||
if ext and ext not in IMAGE_TYPES or ext in [".gif", ".apng"]:
|
||||
if ext and ext not in IMAGE_TYPES or ext in [".gif", ".apng", ".psd"]:
|
||||
self.ext_badge.setHidden(False)
|
||||
self.ext_badge.setText(ext.upper()[1:])
|
||||
if ext in VIDEO_TYPES + AUDIO_TYPES:
|
||||
|
||||
@@ -259,7 +259,11 @@ class ThumbRenderer(QObject):
|
||||
artwork = Image.open(BytesIO(mp4_covers[0]))
|
||||
if artwork:
|
||||
image = artwork
|
||||
except (mp4.MP4MetadataError, mp4.MP4StreamInfoError) as e:
|
||||
except (
|
||||
mp4.MP4MetadataError,
|
||||
mp4.MP4StreamInfoError,
|
||||
id3.ID3NoHeaderError,
|
||||
) as e:
|
||||
logging.error(
|
||||
f"[ThumbRenderer]{ERROR}: Couldn't read album artwork for {_filepath.name} ({type(e).__name__})"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user