|
@@ -344,10 +344,14 @@ module.exports = class extends coreClass {
|
|
|
if (!station) return next('Station not found.');
|
|
|
if (station.type === 'community' && station.partyMode && station.queue.length === 0) return next(null, null, -11, station); // Community station with party mode enabled and no songs in the queue
|
|
|
if (station.type === 'community' && station.partyMode && station.queue.length > 0) { // Community station with party mode enabled and songs in the queue
|
|
|
- return this.db.models.station.updateOne({_id: stationId}, {$pull: {queue: {_id: station.queue[0]._id}}}, (err) => {
|
|
|
- if (err) return next(err);
|
|
|
- next(null, station.queue[0], -12, station);
|
|
|
- });
|
|
|
+ if (station.paused) {
|
|
|
+ return next(null, null, -19, station);
|
|
|
+ } else {
|
|
|
+ return this.db.models.station.updateOne({_id: stationId}, {$pull: {queue: {_id: station.queue[0]._id}}}, (err) => {
|
|
|
+ if (err) return next(err);
|
|
|
+ next(null, station.queue[0], -12, station);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
if (station.type === 'community' && !station.partyMode) {
|
|
|
return this.db.models.playlist.findOne({_id: station.privatePlaylist}, (err, playlist) => {
|