fix: ensure directories exist before use and update cover metadata - #735
fix: ensure directories exist before use and update cover metadata#735kt286 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kt286 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @kt286. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnsures required config/cache/database directories are pre-created using QDir::mkpath, simplifies image directory setup in MusicSettings, and fixes cover/lyric metadata freshness and metaChanged signaling for the currently playing media. Sequence diagram for updated cover ready signaling and metaChanged emissionsequenceDiagram
participant DataManager
participant Presenter
participant PlayerEngine
DataManager->>Presenter: signalMetaCoverReady(meta)
Presenter->>Presenter: emit metaCoverReady(Utils::metaToVariantMap(meta))
Presenter->>PlayerEngine: getMediaMeta()
PlayerEngine-->>Presenter: MediaMeta currentMeta
Presenter-->>Presenter: [currentMeta.hash == meta.hash]
Presenter->>Presenter: emit metaChanged()
Sequence diagram for getActivateMeta fetching freshest cover and lyric metadatasequenceDiagram
participant Presenter
participant PlayerEngine
participant DataManager
Presenter->>Presenter: getActivateMeta()
Presenter->>PlayerEngine: getMediaMeta()
PlayerEngine-->>Presenter: MediaMeta meta
Presenter-->>Presenter: [!meta.hash.isEmpty()]
Presenter->>DataManager: metaFromHash(meta.hash)
DataManager-->>Presenter: MediaMeta latestMeta
Presenter-->>Presenter: [!latestMeta.hash.isEmpty()]
Presenter-->>Presenter: update meta.coverUrl, meta.hasimage, meta.lyricPath
Presenter->>Presenter: Utils::metaToVariantMap(meta)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
ab61c45 to
3f45822
Compare
- Pre-create config/cache/database directories using QDir::mkpath() to fix build on MSYS2 where directories may not exist yet - Simplify directory creation logic in MusicSettings - Emit metaChanged signal when cover is ready for current playing media - Fetch latest cover/lyric metadata from database in getActivateMeta() fix: 确保目录在使用前已创建,并修复封面元数据更新 - 使用 QDir::mkpath() 预创建配置/缓存/数据库目录, 修复 MSYS2 构建时目录不存在的问题 - 简化 MusicSettings 中的目录创建逻辑 - 当前播放歌曲的封面就绪时发送 metaChanged 信号 - 在 getActivateMeta() 中从数据库获取最新的封面和歌词路径
3f45822 to
ac5224d
Compare
fix: 确保目录在使用前已创建,并修复封面元数据更新
Summary by Sourcery
Ensure application creates required config, cache, and database directories before use and keeps active media cover/lyric metadata in sync with the database.
New Features:
Bug Fixes:
Enhancements: