导入覆盖三修:格式白名单放宽 + 跳过提示 + 导入即生成海报#181
Merged
Merged
Conversation
… on import Three import-coverage fixes vs upstream (MediaTab / MediaAsset): - Whitelist widened to what the ffmpeg backend actually decodes (upstream accepts anything AVFoundation recognizes, MediaTab.swift:754-756): video 3->14 exts (+mkv/webm/avi/mts/m2ts/mpg/mpeg/3gp/wmv/flv/ts), audio 4->11 (+flac/ogg/opus/aiff/aif/wma/caf), image 6->9 (+bmp/gif/avif). json/lottie still excluded (separate feature). Deliberate cross-platform divergence from upstream's UTType filter, documented. Dialog filters in mediaActions match. - No more silent drops: MediaListDto gains `skipped: Vec<String>` (camelCase, default-empty, only import populates it); import_media/import_folder collect unsupported-type file names; frontend toasts "已跳过 N 个不支持的文件" (upstream mediaPanelToast, EditorViewModel+MediaLibrary.swift:65-68) — closes the "import did nothing" complaint class. - Eager grid poster at import (upstream loadMetadata 320px poster, MediaAsset.swift:127-160): proven gap — import_one never generated a poster, the DTO only read an ALREADY-cached file, so fresh imports showed placeholders until the panel's lazy queue got to them. warm_import_poster now best-effort disk-caches the same 120x68 grid poster at import; failures swallowed (placeholder as before, never an import error). Removed collect_media_files/collect_into (this change deleted their only production caller; replaced by list_dir/list_top_level with equivalent tests; zero remaining references). Gates: fmt/clippy -D warnings clean; cargo test --workspace 1376; pnpm build clean; pnpm test 330.
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.
①白名单放宽到 ffmpeg 实际可解(视频 3→14、音频 4→11、图片 6→9 种扩展名;上游 UTType 宽过滤的跨平台等价,已文档化)②不支持文件不再静默丢弃——MediaListDto 增 skipped 字段 + 前端 toast(治'导入没反应')③导入即生成网格海报(实证此前只读已缓存文件,新导入全是占位图)。顺带删除因本改动而孤立的 collect_media_files(零残留引用,测试等价替换)。门禁:workspace 1376 + web 330 全绿。