Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions files/usr/bin/xapp-aiff-thumbnailer
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading