Fix bad youtube callback crashing server

This commit is contained in:
calzoneman 2013-03-20 22:29:26 -05:00
parent 090eaa37c2
commit d68d0277bb
1 changed files with 16 additions and 11 deletions

View File

@ -332,6 +332,7 @@ Channel.prototype.enqueue = function(data) {
return; return;
} }
try {
// Whoever decided on this variable name should be fired // Whoever decided on this variable name should be fired
var seconds = data.entry.media$group.yt$duration.seconds; var seconds = data.entry.media$group.yt$duration.seconds;
// This one's slightly better // This one's slightly better
@ -343,6 +344,10 @@ Channel.prototype.enqueue = function(data) {
pos: idx pos: idx
}); });
chan.addToLibrary(vid); chan.addToLibrary(vid);
}
catch(e) {
console.log("YTQueue Fail: id=" + id);
}
}})(this, data.id); }})(this, data.id);
InfoGetter.getYTInfo(data.id, callback); InfoGetter.getYTInfo(data.id, callback);
} }