10 seconds instead of 20

This commit is contained in:
Kasper Rynning-Tønnesen
2015-05-03 01:45:25 +02:00
parent f3f9e48956
commit 617662c455
2 changed files with 3 additions and 3 deletions

View File

@@ -304,11 +304,11 @@ io.on('connection', function(socket){
db.collection(coll).find({skip: false}, function(err, docs){ db.collection(coll).find({skip: false}, function(err, docs){
if(docs.length == 1) if(docs.length == 1)
{ {
if(lists[coll].length/2 <= docs[0]["skips"].length+1 && !contains(docs[0]["skips"], guid) && get_time() - docs[0]["startTime"] >= 20) if(lists[coll].length/2 <= docs[0]["skips"].length+1 && !contains(docs[0]["skips"], guid) && get_time() - docs[0]["startTime"] >= 10)
{ {
change_song(coll); change_song(coll);
socket.emit("toast", "skip"); socket.emit("toast", "skip");
}else if(get_time() - docs[0]["startTime"] < 20) }else if(get_time() - docs[0]["startTime"] < 10)
{ {
socket.emit("toast", "notyetskip"); socket.emit("toast", "notyetskip");
}else if(!contains(docs[0]["skips"], guid) && get_time() - docs[0]["startTime"] >= 30){ }else if(!contains(docs[0]["skips"], guid) && get_time() - docs[0]["startTime"] >= 30){

View File

@@ -40,7 +40,7 @@ socket.on("toast", function(msg)
msg=rnd(["Skipping is democratic, only one vote per person!", "More people have to vote to skip, not just you!", "Get someone else to skip too! You can't do it on yourself."]) msg=rnd(["Skipping is democratic, only one vote per person!", "More people have to vote to skip, not just you!", "Get someone else to skip too! You can't do it on yourself."])
break; break;
case "notyetskip": case "notyetskip":
msg="Skipping is disabled the first 30 seconds of the video."; msg="Skipping is disabled the first 10 seconds of the video.";
break; break;
} }
Materialize.toast(msg, 4000); Materialize.toast(msg, 4000);