Bladeren bron

Fixed issues with playlists.

KrisVos130 8 jaren geleden
bovenliggende
commit
486cc97247
3 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  1. 1 0
      backend/logic/actions/playlists.js
  2. 3 1
      backend/logic/actions/stations.js
  3. 0 1
      backend/logic/db/schemas/playlist.js

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

@@ -109,6 +109,7 @@ let lib = {
 			}
 
 		], (err, playlist) => {
+			console.log(err, playlist);
 			if (err) return cb({ 'status': 'failure', 'message': 'Something went wrong'});
 			cache.pub('playlist.create', playlist._id);
 			return cb({ 'status': 'success', 'message': 'Successfully created playlist' });

+ 3 - 1
backend/logic/actions/stations.js

@@ -545,7 +545,9 @@ module.exports = {
 							if (err) return cb(err);
 							stations.updateStation(stationId, (err, station) => {
 								if (err) return cb(err);
-								stations.skipStation(stationId)();
+								if (!station.partyMode) {
+									stations.skipStation(stationId)();
+								}
 								cache.pub('privatePlaylist.selected', {playlistId, stationId});
 								cb({'status': 'success', 'message': 'Playlist selected.'});
 							});

+ 0 - 1
backend/logic/db/schemas/playlist.js

@@ -1,5 +1,4 @@
 module.exports = {
-	_id: { type: String, lowercase: true, max: 16, min: 2 },
 	displayName: { type: String, min: 2, max: 32, required: true },
 	songs: { type: Array },
 	createdBy: { type: String, required: true },