mirror of https://github.com/calzoneman/sync.git
Prevent vimeo from logging errors when videos become private/removed
This commit is contained in:
parent
ef921b1f96
commit
b88f1931c6
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue