mirror of
https://github.com/calzoneman/sync.git
synced 2024-09-13 04:32:09 +00:00
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 parse = function (data) {
|
||||||
var i = data.indexOf("{\"cdn_url\"");
|
var i = data.indexOf("{\"cdn_url\"");
|
||||||
if (i === -1) {
|
if (i === -1) {
|
||||||
/* TODO possibly send an error message? */
|
|
||||||
//Logger.errlog.log("Vimeo workaround failed (i=-1): http://vimeo.com/" + id);
|
|
||||||
setImmediate(function () {
|
setImmediate(function () {
|
||||||
cb({});
|
cb({});
|
||||||
});
|
});
|
||||||
@ -933,6 +931,12 @@ function vimeoWorkaround(id, cb) {
|
|||||||
var json = data.substring(i, j+1);
|
var json = data.substring(i, j+1);
|
||||||
try {
|
try {
|
||||||
json = JSON.parse(json);
|
json = JSON.parse(json);
|
||||||
|
if (!json.request.files) {
|
||||||
|
setImmediate(function () {
|
||||||
|
cb({});
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
var codec = json.request.files.codecs[0];
|
var codec = json.request.files.codecs[0];
|
||||||
var files = json.request.files[codec];
|
var files = json.request.files[codec];
|
||||||
setImmediate(function () {
|
setImmediate(function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user