feat(chore): 适配插件格式并优化歌词解析

- 自动识别 TTML/KRC/YRC/QRC/LRC 歌词格式
- 适配最新QZ插件格式标准
- 插件安装后刷新列表缓存并同步搜索页状态
This commit is contained in:
lqtmcstudio
2026-06-07 00:51:46 +08:00
parent 72f4510dc8
commit 760881de4f
7 changed files with 656 additions and 200 deletions

View File

@@ -27,6 +27,14 @@ contextBridge.exposeInMainWorld('electronAPI', {
getAll: () => ipcRenderer.invoke('plugin:getAll'),
uninstall: (id: string) => ipcRenderer.invoke('plugin:uninstall', id),
install: () => ipcRenderer.invoke('plugin:install'),
onChanged: (callback: (change: { action: string; pluginId?: string }) => void) => {
const listener = (
_event: Electron.IpcRendererEvent,
change: { action: string; pluginId?: string },
) => callback(change)
ipcRenderer.on('plugin:changed', listener)
return () => ipcRenderer.removeListener('plugin:changed', listener)
},
},
// Cache Control
@@ -46,4 +54,4 @@ contextBridge.exposeInMainWorld('electronAPI', {
getAccentColor: () => ipcRenderer.invoke('settings:getAccentColor'),
setAccentColor: (color: string) => ipcRenderer.invoke('settings:setAccentColor', color)
}
})
})