mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed player issue, and viewer issue on new channels
This commit is contained in:
@@ -28,7 +28,7 @@ function check_inlist(coll, guid, socket, offline)
|
||||
{
|
||||
if(!offline && coll != undefined){
|
||||
db.collection("connected_users").update({"_id": coll}, {$addToSet:{users: guid}}, {upsert: true}, function(err, updated) {
|
||||
if(updated.nModified > 0) {
|
||||
if(updated.nModified > 0 || updated.upserted != undefined) {
|
||||
db.collection("connected_users").find({"_id": coll}, function(err, new_doc) {
|
||||
db.collection("frontpage_lists").update({"_id": coll}, {$set: {"viewers": new_doc[0].users.length}}, function(){
|
||||
if(new_doc[0].users == undefined || new_doc[0].users.length == undefined) {
|
||||
@@ -41,7 +41,6 @@ function check_inlist(coll, guid, socket, offline)
|
||||
socket.broadcast.to(coll).emit('chat', {from: docs[0].name, msg: " joined"});
|
||||
}
|
||||
});
|
||||
|
||||
db.collection("connected_users").update({"_id": "total_users"}, {$inc: {total_users: 1}}, function(err, docs){});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -59,7 +59,8 @@ function list(msg, guid, coll, offline, socket) {
|
||||
db.collection(coll).insert(configs, function(err, docs){
|
||||
socket.join(coll);
|
||||
List.send_list(coll, socket, true, false, true);
|
||||
db.collection("frontpage_lists").insert({"_id": coll, "count" : 0, "frontpage": true, "accessed": Functions.get_time()});
|
||||
db.collection("frontpage_lists").insert({"_id": coll, "count" : 0, "frontpage": true, "accessed": Functions.get_time(), "viewers": 1});
|
||||
Functions.check_inlist(coll, guid, socket, offline);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2870,6 +2870,7 @@ nav ul li:hover, nav ul li.active {
|
||||
|
||||
#player{
|
||||
pointer-events:none;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.row .col.s12 {
|
||||
|
||||
@@ -188,6 +188,9 @@ var List = {
|
||||
$(".first_page").css("display", "none");
|
||||
$(".next_page_hide").css("display","inline-flex");
|
||||
$(".prev_page_hide").css("display","inline-flex");
|
||||
} else {
|
||||
$(".next_page").css("display", "none");
|
||||
$(".last_page").css("display", "none");
|
||||
}
|
||||
|
||||
List.dynamicContentPage(-10);
|
||||
|
||||
Reference in New Issue
Block a user