Skip to content

Find a thumbnailer through its type's aliases - #184

Open
dhh wants to merge 2 commits into
mainfrom
thumbnailer-aliases
Open

dhh wants to merge 2 commits into
mainfrom
thumbnailer-aliases

Conversation

@dhh

@dhh dhh commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Based on #66 by @thisisgm.

A thumbnailer that names a type only by an alias never matched the canonical name Folio asks with, so glycin's image/x-dds left a DDS file blank, and WAV audio missed the thumbnailer it had. The declared types are resolved to canonical names once, when the thumbnailers are read. Within one folder a .thumbnailer file that names the type itself still wins over one that names an alias of it.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Thumbnailers now match files when their declared file type is an alias of the name Folio uses.

  • Folio can now use thumbnailers that name a MIME type by an alias.

The earlier test compatibility issue is fixed. No new actionable issues were found.

Reviews (3) · Last reviewed commit: "Test aliases with names every MIME datab..." · Reviewed by Greptile

Comment thread tests/folio_tests.cpp Resolved
thisisgm and others added 2 commits November 18, 2026 17:23
A thumbnailer that names a type only by an alias never matched the
canonical name Folio asks with, so glycin's image/x-dds left a DDS
file blank, and WAV audio missed the thumbnailer it had. The declared
types are resolved to canonical names once, when the thumbnailers are
read. Within one folder a .thumbnailer file that names the type itself
still wins over one that names an alias of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test took video/matroska and audio/vnd.wave to be the canonical
names, which they are only in newer shared-mime-info; with 2.2 the
x- names are, and the test failed with the code working. Which file
wins within one folder is now checked with comic book RAR archives,
whose canonical name and x-cbr alias have stood for years.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh force-pushed the thumbnailer-aliases branch from 41f81f3 to 3bca716 Compare November 18, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants