Browse Source

Fixed issue with party mode

Kristian Vos 4 years ago
parent
commit
2db76aa824
2 changed files with 10 additions and 9 deletions
  1. 1 0
      backend/logic/actions/playlists.js
  2. 9 9
      frontend/src/pages/Station/index.vue

+ 1 - 0
backend/logic/actions/playlists.js

@@ -206,6 +206,7 @@ export default {
 
 				(playlist, next) => {
 					if (!playlist || playlist.createdBy !== session.userId) return next("Playlist not found.");
+					playlist.songs.sort((a, b) => a.position - b.position);
 					return next(null, playlist.songs[0]);
 				}
 			],

+ 9 - 9
frontend/src/pages/Station/index.vue

@@ -705,15 +705,15 @@ export default {
 			// 	);
 			// }
 
-			if (
-				!isInQueue &&
-				this.privatePlaylistQueueSelected &&
-				(this.automaticallyRequestedSongId !==
-					this.currentSong.songId ||
-					!this.currentSong.songId)
-			) {
-				this.addFirstPrivatePlaylistSongToQueue();
-			}
+			// if (
+			// 	!isInQueue &&
+			// 	this.privatePlaylistQueueSelected &&
+			// 	(this.automaticallyRequestedSongId !==
+			// 		this.currentSong.songId ||
+			// 		!this.currentSong.songId)
+			// ) {
+			// 	this.addFirstPrivatePlaylistSongToQueue();
+			// }
 		});
 
 		this.socket.on("event:stations.pause", data => {