Fix the only thing I see that could possibly still cause #285

This commit is contained in:
calzoneman 2013-10-07 19:03:20 -05:00
parent f5cbdb2f24
commit a3153246ce
3 changed files with 40 additions and 27 deletions

View file

@ -6,6 +6,8 @@ socket.on('connect', function () {
socket.emit('joinChannel', { name: 'test' });
});
socket.on('login', testAddVideos);
socket.on('queueFail', function (msg) {
console.log(msg);
});
@ -21,7 +23,17 @@ function testAddVideos() {
ids.push(pl[i].id);
}
for (var i = 0; i < ids.length; i++) {
// burst the first 10
for (var i = 0; i < 10; i++) {
console.log('queue', ids[i]);
socket.emit('queue', {
id: ids[i],
type: 'yt',
pos: 'end'
});
}
for (var i = 10; i < ids.length; i++) {
(function (i) {
setTimeout(function () {
console.log('queue', ids[i]);
@ -30,9 +42,7 @@ function testAddVideos() {
type: 'yt',
pos: 'end'
});
}, 1050 * i);
}, 1050 * (i - 9));
})(i);
}
}
testAddVideos();