修复列表备份文件存在异常歌曲信息时无法导入的问题

This commit is contained in:
lyswhut
2023-01-02 18:35:42 +08:00
parent 7e94e96bcc
commit 95590dd07f
4 changed files with 13 additions and 29 deletions
-8
View File
@@ -60,14 +60,6 @@ export const deduplicationList = <T extends LX.Music.MusicInfo>(list: T[]): T[]
return true
})
}
export const filterMusicList = <T extends LX.Music.MusicInfo>(list: T[]): T[] => {
const ids: Set<string> = new Set()
return list.filter(s => {
if (!s.id || ids.has(s.id)) return false
ids.add(s.id)
return true
})
}
export const langS2T = async(str: string) => {
return await window.lx.worker.main.langS2t(Buffer.from(str).toString('base64')).then(b64 => Buffer.from(b64, 'base64').toString())