Added test serverside to ensure that title is correct + duration isn't insanely much higher that it should be

This commit is contained in:
Kasper Rynning-Tønnesen
2017-11-09 16:11:57 +01:00
parent dd357ce7e3
commit e5013599c8
4 changed files with 23 additions and 1 deletions

View File

@@ -88,8 +88,11 @@ function add_function(arr, coll, guid, offline, socket) {
db.collection(coll).update({views:{$exists:true}}, {$set:{startTime: Functions.get_time()}});
List.send_play(coll, undefined);
Frontpage.update_frontpage(coll, id, title);
Search.get_correct_info(new_song, coll, false);
} else {
io.to(coll).emit("channel", {type: "added", value: {"_id": "asd", "added":added,"guids":guids,"id":id,"now_playing":np,"title":title,"votes":votes, "duration":duration}});
var new_song = {"_id": "asd", "added":added,"guids":guids,"id":id,"now_playing":np,"title":title,"votes":votes, "duration":duration};
io.to(coll).emit("channel", {type: "added", value: new_song});
Search.get_correct_info(new_song, coll, true);
}
db.collection("frontpage_lists").update({_id:coll}, {$inc:{count:1}, $set:{accessed: Functions.get_time()}}, {upsert:true}, function(err, docs){});
List.getNextSong(coll);