View difference between Paste ID: 49Ja4vkt and hXCNadQe
SHOW: | | - or go back to the newest paste.
1
Models.history.load();
2
var skippedsongs = new Array();
3
4
API.addEventListener(API.DJ_UPDATE, repeatcheck);
5
6-
function inarray(array, id) {
6+
7-
    for(var i=0;i<array.length;i++) {
7+
8-
        if(array[i][0].id == id) {
8+
9-
            return true;
9+
10-
        }
10+
11-
    }
11+
12-
    return false;
12+
13
if (historylist[j].media.cid == currentID) {
14
15
if ($.inArray(currentID, skippedsongs) == -1) {
16
API.moderateForceSkip();
17
API.sendChat("Sorry, that song's still in history (song " + j + " out of 50)");
18
skippedsongs.push(currentID);
19
break;
20
}
21
}
22
}
23
}