Skip to content

Commit 1138d46

Browse files
committed
lol
1 parent 0513a41 commit 1138d46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MyMusicClientSveltePwa/src/lib/scripts/playbackService.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@ export function setPlaylists(playlistId) {
201201
if (currentPlaylistId === playlistId) {
202202
// update current playlist
203203
originalPlaylistSongs = getCachedPlaylistSongs(playlistId);
204+
205+
// get difference between originalPlaylistSongs and playlistSongs
206+
const newSongs = originalPlaylistSongs.filter(song => !playlistSongs.some(ps => ps.id === song.id));
204207

205208
if (newSongs.length === 0) {
206209
// No new songs, nothing to update
207210
return;
208211
}
209212

210-
// get difference between originalPlaylistSongs and playlistSongs
211-
const newSongs = originalPlaylistSongs.filter(song => !playlistSongs.some(ps => ps.id === song.id));
212-
213213
if (get(isShuffledEnabled)) {
214214
// shuffle the new songs and add them to the playlist
215215
const shuffledNewSongs = shuffleArray(newSongs);

0 commit comments

Comments
 (0)