forked from 0x2620/pandora
start next video in timeout
This commit is contained in:
parent
7b401cfe28
commit
3408f0d21d
1 changed files with 8 additions and 2 deletions
|
@ -48,7 +48,10 @@ pandora.fs = (function() {
|
||||||
delete that.downloads[id];
|
delete that.downloads[id];
|
||||||
active = false;
|
active = false;
|
||||||
if (queue.length) {
|
if (queue.length) {
|
||||||
cacheVideo.apply(null, queue.shift());
|
var next = queue.shift();
|
||||||
|
setTimeout(function() {
|
||||||
|
cacheVideo(next[0], next[1]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
downloadPart(part + 1);
|
downloadPart(part + 1);
|
||||||
|
@ -94,7 +97,10 @@ pandora.fs = (function() {
|
||||||
delete that.downloads[id];
|
delete that.downloads[id];
|
||||||
active = false;
|
active = false;
|
||||||
if (queue.length) {
|
if (queue.length) {
|
||||||
cacheVideo.apply(null, queue.shift());
|
var next = queue.shift();
|
||||||
|
setTimeout(function() {
|
||||||
|
cacheVideo(next[0], next[1]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pandora.api.get({id: id, keys: ['parts']}, function(result) {
|
pandora.api.get({id: id, keys: ['parts']}, function(result) {
|
||||||
|
|
Loading…
Reference in a new issue