Skip to content

fix: match file extensions case-insensitively - #200

Open
anrinion wants to merge 1 commit into
BKDDFS:mainfrom
anrinion:fix/case-insensitive-file-extensions
Open

anrinion wants to merge 1 commit into
BKDDFS:mainfrom
anrinion:fix/case-insensitive-file-extensions

Conversation

@anrinion

@anrinion anrinion commented Oct 8, 2026

Copy link
Copy Markdown

Summary

  • FileExtension.contains() compared entry.suffix against the enum's lowercase extension values case-sensitively, so files with uppercase extensions (e.g. iPhone's default IMG_1234.MOV) were silently skipped by _list_input_directory_files, surfacing as a confusing EmptyInputDirectoryError even though a valid video was present in the input directory.
  • Lowercases the input before the membership check so extension matching is case-insensitive.

Closes #199

Test plan

  • Reproduced: placed an uppercase-extension video (IMG_xxxx.MOV) in input_directory, ran best_frames_extractor via docker-compose up + POST /v2/extractors/best_frames_extractor — failed with EmptyInputDirectoryError before the fix.
  • Applied the fix, rebuilt, re-ran the same request — file was found, frame extracted successfully, input file renamed with frames_extracted_ prefix as expected.

FileExtension.contains() compared entry.suffix against the enum's
lowercase values case-sensitively, so files with uppercase extensions
(e.g. iPhone's default IMG_1234.MOV) were silently skipped, making
the extractor report an empty input directory even when a valid
video was present.

Closes BKDDFS#199

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@anrinion
anrinion requested a review from BKDDFS as a code owner October 8, 2026 15:52
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.

Video/image files with uppercase extensions (e.g. .MOV) are silently ignored

1 participant