mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-15 17:07:29 +08:00
fix(本地音乐): 扫描阶段直接使用mtime做增量判断
This commit is contained in:
Vendored
+4
@@ -30,6 +30,10 @@ interface API {
|
||||
lxMusicHttpCancel: (requestId: string) => Promise<void>;
|
||||
/** 扫描指定文件夹中的本地音乐文件 */
|
||||
scanLocalMusic: (folderPath: string) => Promise<{ files: string[]; count: number }>;
|
||||
/** 扫描指定文件夹中的本地音乐文件(包含修改时间) */
|
||||
scanLocalMusicWithStats: (
|
||||
folderPath: string
|
||||
) => Promise<{ files: { path: string; modifiedTime: number }[]; count: number }>;
|
||||
/** 批量解析本地音乐文件元数据 */
|
||||
parseLocalMusicMetadata: (
|
||||
filePaths: string[]
|
||||
|
||||
@@ -54,6 +54,7 @@ const api = {
|
||||
'cache-lyric',
|
||||
'clear-lyric-cache',
|
||||
'scan-local-music',
|
||||
'scan-local-music-with-stats',
|
||||
'parse-local-music-metadata'
|
||||
];
|
||||
if (validChannels.includes(channel)) {
|
||||
@@ -72,6 +73,8 @@ const api = {
|
||||
|
||||
// 本地音乐扫描相关
|
||||
scanLocalMusic: (folderPath: string) => ipcRenderer.invoke('scan-local-music', folderPath),
|
||||
scanLocalMusicWithStats: (folderPath: string) =>
|
||||
ipcRenderer.invoke('scan-local-music-with-stats', folderPath),
|
||||
parseLocalMusicMetadata: (filePaths: string[]) =>
|
||||
ipcRenderer.invoke('parse-local-music-metadata', filePaths)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user