Browse Source

fix: with experimental weights, you could have the same song more than once in the queue

Kristian Vos 1 year ago
parent
commit
9db04fecec
1 changed files with 2 additions and 1 deletions
  1. 2 1
      backend/logic/stations.js

+ 2 - 1
backend/logic/stations.js

@@ -616,7 +616,8 @@ class _StationsModule extends CoreClass {
 						playlistSongs.every(song => {
 							if (
 								songsToAdd.length < songsStillNeeded &&
-								currentYoutubeIds.indexOf(song.youtubeId) === -1
+								currentYoutubeIds.indexOf(song.youtubeId) === -1 &&
+								!songsToAdd.find(songToAdd => songToAdd.youtubeId === song.youtubeId)
 							) {
 								lastSongAdded = song;
 								songsToAdd.push(song);