mirror of https://github.com/calzoneman/sync.git
Fix bad youtube callback crashing server
This commit is contained in:
parent
090eaa37c2
commit
d68d0277bb
|
@ -332,6 +332,7 @@ Channel.prototype.enqueue = function(data) {
|
|||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// Whoever decided on this variable name should be fired
|
||||
var seconds = data.entry.media$group.yt$duration.seconds;
|
||||
// This one's slightly better
|
||||
|
@ -343,6 +344,10 @@ Channel.prototype.enqueue = function(data) {
|
|||
pos: idx
|
||||
});
|
||||
chan.addToLibrary(vid);
|
||||
}
|
||||
catch(e) {
|
||||
console.log("YTQueue Fail: id=" + id);
|
||||
}
|
||||
}})(this, data.id);
|
||||
InfoGetter.getYTInfo(data.id, callback);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue