diff --git a/files/usr/bin/xapp-aiff-thumbnailer b/files/usr/bin/xapp-aiff-thumbnailer index 6408d4a..5a21402 100644 --- a/files/usr/bin/xapp-aiff-thumbnailer +++ b/files/usr/bin/xapp-aiff-thumbnailer @@ -10,12 +10,12 @@ thumbnailer = Thumbnailer() def extract_cover_aiff_file(filepath: Path) -> bytes | None: - if not filepath.is_file() or not filepath.suffix == ".aiff": - return None - aiff_file: AIFF = AIFF(str(filepath)) - if aiff_file.tags is None: - return None try: + if not filepath.is_file() or not filepath.suffix.lower() == ".aiff": + return None + aiff_file: AIFF = AIFF(str(filepath)) + if aiff_file.tags is None: + return None return cast(bytes, aiff_file.tags.getall("APIC")[0].data) except: return None