forked from miao-moe/QZMusic_PC
feat(chore): 适配插件格式并优化歌词解析
- 自动识别 TTML/KRC/YRC/QRC/LRC 歌词格式 - 适配最新QZ插件格式标准 - 插件安装后刷新列表缓存并同步搜索页状态
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user