🐞fix(player/automix): 修复自动混音过渡时桌面歌词与 macOS 状态栏信息不更新的问题#903
Conversation
Pissofdvpe
commented
Feb 19, 2026
- 在 setupSongUI 函数中增加显式的元数据通知逻辑,确保所有平台歌词组件信息同步:
- 调用 playerIpc.sendSongChange 主动通知桌面歌词更新歌曲名称与艺术家。
- 在 macOS 平台发送 mac-statusbar:update-progress 消息,初始化状态栏进度与显示。
- 解决平滑过渡模式下的数据竞态:
- 修复 AutoMix 模式下底层音频加载先于 UI 切换,导致 canplay 事件触发时 musicStore.playSong 尚未更新的问题。
- 通过在 UI 实际切换点再次主动推送元数据,覆盖之前由于竞态发送的旧歌信息,确保歌词组件信息准确。
- 在 setupSongUI 函数中增加显式的元数据通知逻辑,确保所有平台歌词组件信息同步: - 调用 playerIpc.sendSongChange 主动通知桌面歌词更新歌曲名称与艺术家。 - 在 macOS 平台发送 mac-statusbar:update-progress 消息,初始化状态栏进度与显示。 - 解决平滑过渡模式下的数据竞态: - 修复 AutoMix 模式下底层音频加载先于 UI 切换,导致 canplay 事件触发时 musicStore.playSong 尚未更新的问题。 - 通过在 UI 实际切换点再次主动推送元数据,覆盖之前由于竞态发送的旧歌信息,确保歌词组件信息准确。
Summary of ChangesHello @Pissofdvpe, 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! 此拉取请求解决了在自动混音过渡期间,桌面歌词和 macOS 状态栏信息未能及时更新的关键同步问题。它在播放器 UI 设置过程中引入了显式的元数据更新机制,并解决了一个导致显示过时歌曲信息的数据竞态问题,从而提升了平滑歌曲过渡的用户体验。 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
|
- 在 PlayerController.ts 的 setupSongUI 方法中,将手动通过 ipcRenderer.send 发送的 mac-statusbar:update-progress 消息,替换为了调用项目中标准的 playerIpc.sendTaskbarProgressData 函数。