diff --git a/src/jotais/library.ts b/src/jotais/library.ts index 384fe9f..02bc59a 100644 --- a/src/jotais/library.ts +++ b/src/jotais/library.ts @@ -10,8 +10,15 @@ sharedStore.sub(scannedJotai, () => { const list: Song[] = []; const storages = sharedStore.get(storagesJotai); + const idPool: Song['id'][] = []; for (const storageId in storages) { - const { songList } = storages[storageId]; + let { songList } = storages[storageId]; + songList = songList.filter((song) => { + if (!idPool.includes(song.id)) { + idPool.push(song.id); + return true; + } + }); list.push(...songList); }