mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue with added a playlist to a recently cleared channel
This commit is contained in:
@@ -21,8 +21,8 @@ function add_function(arr, coll, guid, offline, socket) {
|
||||
var last = arr.num == arr.total - 1;
|
||||
var num = arr.num;
|
||||
var total = arr.total;
|
||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs)
|
||||
{
|
||||
/*db.collection(coll).find({views:{$exists:true}}, function(err, docs)
|
||||
{*/
|
||||
conf = docs;
|
||||
if(docs !== null && docs.length !== 0 && ((docs[0].addsongs === true && (hash == docs[0].adminpass || docs[0].adminpass === "")) ||
|
||||
docs[0].addsongs === false))
|
||||
@@ -135,7 +135,7 @@ function add_function(arr, coll, guid, offline, socket) {
|
||||
socket.emit("toast", "listhaspass");
|
||||
}
|
||||
}
|
||||
});
|
||||
//});
|
||||
} else {
|
||||
socket.emit("auth_required");
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ var conf = [];
|
||||
var private_channel = false;
|
||||
var music = 0;
|
||||
var frontpage = 1;
|
||||
var empty_clear = false;
|
||||
var adminpass = "";
|
||||
var showDiscovery = false;
|
||||
var temp_name = "";
|
||||
|
||||
@@ -153,6 +153,13 @@ var Player = {
|
||||
}
|
||||
duration = Player.player.getDuration();
|
||||
}
|
||||
|
||||
if(Object.keys(obj).length == 0) {
|
||||
paused = false;
|
||||
empty_clear = true;
|
||||
} else {
|
||||
empty_clear = false;
|
||||
}
|
||||
},
|
||||
|
||||
onPlayerStateChange: function(newState) {
|
||||
@@ -208,7 +215,9 @@ var Player = {
|
||||
$("#playpause").css("pointer-events", "all");
|
||||
$("#channel-load").css("display", "none");
|
||||
}
|
||||
paused = true;
|
||||
if(!empty_clear) {
|
||||
paused = true;
|
||||
}
|
||||
if(window.location.pathname != "/") Playercontrols.play_pause_show();
|
||||
mobile_beginning = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user