Prevent vimeo from logging errors when videos become private/removed

This commit is contained in:
calzoneman 2014-08-11 11:58:03 -05:00
parent ef921b1f96
commit b88f1931c6
1 changed files with 6 additions and 2 deletions

View File

@ -922,8 +922,6 @@ function vimeoWorkaround(id, cb) {
var parse = function (data) {
var i = data.indexOf("{\"cdn_url\"");
if (i === -1) {
/* TODO possibly send an error message? */
//Logger.errlog.log("Vimeo workaround failed (i=-1): http://vimeo.com/" + id);
setImmediate(function () {
cb({});
});
@ -933,6 +931,12 @@ function vimeoWorkaround(id, cb) {
var json = data.substring(i, j+1);
try {
json = JSON.parse(json);
if (!json.request.files) {
setImmediate(function () {
cb({});
});
return;
}
var codec = json.request.files.codecs[0];
var files = json.request.files[codec];
setImmediate(function () {