mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fix for empty list import (#459)
* Fix for empty list import * Flex on enable also
This commit is contained in:
committed by
GitHub
parent
03ca6a9f77
commit
bcd00aa93e
@@ -180,6 +180,10 @@ function addPlaylist(arr, guid, offline, socket) {
|
||||
return;
|
||||
}
|
||||
var channel = arr.channel;//.replace(/ /g,'').toLowerCase();
|
||||
if(arr.length == 0 || arr.songs.length == 0) {
|
||||
socket.emit("toast", "Empty list..");
|
||||
return;
|
||||
}
|
||||
db.collection("frontpage_lists").find({_id: channel}, function(err, fp) {
|
||||
if(fp.length == 0) {
|
||||
socket.emit("toast", "nolist");
|
||||
@@ -201,7 +205,7 @@ function addPlaylist(arr, guid, offline, socket) {
|
||||
var now_playing = false;
|
||||
if(np.length == 0) now_playing = true;
|
||||
db.collection(channel + "_settings").find({id: "config"}, function(e, conf) {
|
||||
if(arr.length == 0) {
|
||||
if(arr.length == 0 || arr.songs.length) {
|
||||
socket.emit("toast", "Empty list..");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user