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;
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ var Channel = {
|
||||
} else {
|
||||
Helper.log(["Spotify is not authenticated"]);
|
||||
Helper.css(".spotify_authenticated", "display", "none");
|
||||
Helper.css(".spotify_unauthenticated", "display", "block");
|
||||
Helper.css(".spotify_unauthenticated", "display", "flex");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1344,7 +1344,7 @@ function addDynamicListeners() {
|
||||
access_token_data = {};
|
||||
Channel.spotify_is_authenticated(false);
|
||||
Helper.css(".spotify_authenticated", "display", "none");
|
||||
Helper.css(".spotify_unauthenticated", "display", "block");
|
||||
Helper.css(".spotify_unauthenticated", "display", "flex");
|
||||
}, access_token_data.expires_in * 1000);
|
||||
} else {
|
||||
access_token_data = {};
|
||||
|
||||
Reference in New Issue
Block a user