浏览代码

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

Kristian Vos 2 年之前
父节点
当前提交
9db04fecec
共有 1 个文件被更改,包括 2 次插入1 次删除
  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);