fix(cover): enhance loading reliability and format compatibility#968
fix(cover): enhance loading reliability and format compatibility#968kid141252010 wants to merge 1 commit intoimsyy:devfrom
Conversation
Summary of ChangesHello, 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! 此 PR 旨在全面提升应用程序中封面图片的加载体验,通过引入重试机制和优化代理配置,确保图片在各种网络环境下都能可靠显示。同时,它还解决了歌词清理过程中可能导致的状态不同步问题,从而提高了整体的用户体验和系统稳定性。 Highlights
Changelog
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
|
| store.set("proxy", proxyRules); | ||
| mainWin?.webContents.session.setProxy({ proxyRules }); | ||
| // 直连图片与核心资源,绕过代理避免跨域与防盗链拦截 | ||
| const proxyBypassRules = "*.music.126.net;*.music.163.com;<local>"; |
There was a problem hiding this comment.
proxyBypassRules 字符串 ("*.music.126.net;*.music.163.com;<local>") 在 set-proxy、test-proxy 和 main-window 的初始化逻辑中重复定义。为了提高可维护性并遵循 DRY (Don't Repeat Yourself) 原则,建议将其提取为一个共享常量,例如在 electron/main/utils/config.ts 中定义,并在需要的地方导入使用。
| const proxyBypassRules = "*.music.126.net;*.music.163.com;<local>"; | |
| const proxyBypassRules = PROXY_BYPASS_RULES; |
(疑似是在我改了一堆东西 然后开代理的情况下复现的:在线封面开代理无法显示。就让AI改了点 不确定影响了什么)
Description
该 PR 旨在解决封面图片加载失败及状态不同步的问题。
主要改动:
s-image组件增强: 引入了加载失败重试机制。