mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
poop
This commit is contained in:
@@ -105,7 +105,7 @@ io.on('connection', function(socket){
|
||||
{
|
||||
db.collection(coll).find({now_playing:true}, function(err, docs){
|
||||
if(docs.length > 0 && docs[0]["id"] == arg){
|
||||
change_song(coll, arg);
|
||||
change_song(coll, arg, docs[0]["id"]);
|
||||
}
|
||||
})
|
||||
});
|
||||
@@ -324,7 +324,7 @@ function vote(coll, id, guid, socket)
|
||||
}
|
||||
|
||||
|
||||
function change_song(coll, id)
|
||||
function change_song(coll, id, np_id)
|
||||
{
|
||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
||||
if(docs[0]["removeplay"] == true)
|
||||
@@ -349,6 +349,8 @@ function change_song(coll, id)
|
||||
change_song_post(coll);
|
||||
});
|
||||
}else{
|
||||
console.log(id);
|
||||
console.log(np_id);
|
||||
db.collection(coll).update({now_playing:true, id:id},
|
||||
{$set:{
|
||||
now_playing:false,
|
||||
|
||||
Reference in New Issue
Block a user