fix: 扫描本地音乐时漏掉 opus 后缀音频#880
Conversation
Summary of ChangesHello @Tseshongfeeshur, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在通过扩展应用程序支持的音乐文件扩展名列表来纠正一个缺陷,确保应用程序能够正确识别和处理 Opus 格式的音频文件。这提升了用户体验,使得拥有 Opus 文件的用户能够无缝地将这些文件纳入其音乐库中。 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
|
||
| /** 支持的音乐文件扩展名列表 */ | ||
| const MUSIC_EXTENSIONS = ["mp3", "wav", "flac", "aac", "webm", "m4a", "ogg", "aiff", "aif", "aifc"]; | ||
| const MUSIC_EXTENSIONS = ["mp3", "wav", "flac", "aac", "webm", "m4a", "ogg", "aiff", "aif", "aifc", "opus"]; |
There was a problem hiding this comment.
这个修改很好,正确地添加了 opus 支持。
不过,我注意到 native/tools/src/scanner.rs 文件中有一个更全面的支持扩展名列表。scanDirectory 函数使用的 music-metadata 库实际上也支持更多的格式,例如 ape, wv, mpc, dsf, dff, mkv, mka 和 mp4。
为了提高格式支持的覆盖范围并与原生扫描器保持一致,建议将这些格式也添加到 MUSIC_EXTENSIONS 中。为了可读性,最好将所有扩展名按字母顺序排序。
| const MUSIC_EXTENSIONS = ["mp3", "wav", "flac", "aac", "webm", "m4a", "ogg", "aiff", "aif", "aifc", "opus"]; | |
| const MUSIC_EXTENSIONS = ["aac", "aif", "aifc", "aiff", "ape", "dsf", "dff", "flac", "m4a", "mka", "mkv", "mp3", "mp4", "mpc", "ogg", "opus", "wav", "webm", "wv"]; |
在支持的后缀列表中追加了
, "opus",且经测试(GNU/Linux)其可以正常解析opus格式的元数据。相关 issue:#879