Got automatic detection working for changing song when they are similar enough (higher than 0.75)

This commit is contained in:
Kasper Rynning-Tønnesen
2017-11-09 19:47:31 +01:00
parent 3050d56bf8
commit b03213d61a
4 changed files with 34 additions and 29 deletions

View File

@@ -84,6 +84,7 @@ function add_function(arr, coll, guid, offline, socket) {
db.collection(coll).update({id: id}, {"added": added,"guids":guids,"id":id,"now_playing":np,"title":title,"votes":votes, "duration":duration, "start": start, "end": end}, {upsert: true}, function(err, docs){
if(np)
{
var new_song = {"added": added,"guids":guids,"id":id,"now_playing":np,"title":title,"votes":votes, "duration":duration, "start": start, "end": end};
List.send_list(coll, undefined, false, true, false);
db.collection(coll).update({views:{$exists:true}}, {$set:{startTime: Functions.get_time()}});
List.send_play(coll, undefined);