fix读取嵌入封面异常. 解决方案:始终优先使用嵌入式封面,再回退到 MediaStore 和网络#392
Open
xgkk wants to merge 1 commit into
Open
Conversation
xgkk
commented
Jun 1, 2026
- 新增 hasAnyLocalCover() 快速检查音频文件嵌入式封面
- fetch(song) 始终优先尝试嵌入式封面(不受 ignoreMediaStore 控制)
- MediaStore 仅当 ignoreMediaStore=false 且 albumId>0 时使用
- 确保所有歌曲都能走到网络下载路径
- 新增 hasAnyLocalCover() 快速检查音频文件嵌入式封面 - fetch(song) 始终优先尝试嵌入式封面(不受 ignoreMediaStore 控制) - MediaStore 仅当 ignoreMediaStore=false 且 albumId>0 时使用 - 确保所有歌曲都能走到网络下载路径
Author
Owner
|
直接用 hasAnyLocalCover() 预判,会有两个问题: 1.EmbeddedFetcher 原本不只读 embeddedPicture,还会 fallback 到 jaudiotagger、同目录 cover.jpg/folder.jpg 等。现在如果 hasAnyLocalCover() 返回 false,这些 fallback 路径就不会被尝试了,虽然实际这个实际的用处可能存疑吧。 更理想的做法可能是让封面来源按 embedded://song.data -> MediaStore -> 网络 依次尝试:UriFetcher 不再只返回单个 Uri,而是返回候选来源;APlayerFetcher 按顺序加载,前一个失败再试下一个。这样 ignoreMediaStore 也只需要控制 MediaStore 是否参与 fallback。 另外 ignoreMediaStore 这个名字现在语义也有点不准确。 |
Owner
|
看你好不好改,改动还是比较大,可以借助下AI或者不行可以我来改 @xgkk |
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.

