Skip to content

Commit

Permalink
simplify...
Browse files Browse the repository at this point in the history
  • Loading branch information
NeloBlivion authored Feb 19, 2024
1 parent 3f181b0 commit 1e94951
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/media/SongSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,12 @@ export default {
let currentSongs = []
for (const r of regions) {
currentSongs = await this.searchAutocomplete(query, lang, r);
regionSongs.concat(currentSongs.reduce((acc, cur) => {
if (!parsedIDs.includes(cur.trackId)) {
parsedIDs.append(cur.trackId)
acc.append(cur)
for (const song of currentSongs) {
if (!parsedIDs.includes(song.trackId)) {
parsedIDs.append(song.trackId)
regionSongs.append(song)
}
return acc;
}))
}
};
return regionSongs;
},
Expand Down

0 comments on commit 1e94951

Please sign in to comment.