Repository navigation
fix(wtf_transcribe): resolve audio extensions without the OS MIME table - #211
Merged
Merged
Conversation
…IME table mimetypes.guess_type() depends on the host's MIME table. Slim Linux images ship without /etc/mime.types, so "clip.ogg" resolved to None in CI's container and the dialog fell back to audio/wav, failing test_dialog_mediatype_resolution_order on main. Check a small table of common audio and video extensions first, then the OS table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
mainCI failure introduced by #210:test_dialog_mediatype_resolution_orderfails in the CI container.dialog_mediatype()fell back tomimetypes.guess_type()for the filename extension. That lookup depends on the host's MIME table: macOS resolvesclip.oggtoaudio/ogg, but the slim Linux image CI runs in has no/etc/mime.types, so it returnedNoneand the dialog fell through toaudio/wav. The test passed locally and failed in CI.Change
.wav,.mp3,.ogg,.oga,.opus,.m4a,.aac,.flac,.webm,.mp4), matched case-insensitively before the OS lookup. The result no longer depends on the host.test_dialog_mediatype_extension_table_without_os_mime_tablestubsmimetypes.guess_typeto return nothing, reproducing the CI container, and checks.ogg,.MP3,.opusand a non-media.txt.Tests
conserver/links/wtf_transcribe/: 16 passed.Refs CON-1115
🤖 Generated with Claude Code