Fix vimeo

This commit is contained in:
calzoneman 2014-01-27 18:04:04 -06:00
parent f7932166b2
commit 2558a87e96
1 changed files with 3 additions and 1 deletions

View File

@ -729,7 +729,7 @@ function VimeoIsADoucheCopter(id, cb) {
};
var parse = function (data) {
var i = data.indexOf("a={");
var i = data.indexOf("b={");
var j = data.indexOf("};", i);
var json = data.substring(i+2, j+1);
try {
@ -761,6 +761,8 @@ function VimeoIsADoucheCopter(id, cb) {
} else if (data.indexOf("This video does not exist.") !== -1) {
cb({});
return;
} else if (data.indexOf("Because of its privacy settings, this video cannot be played here.") !== -1) {
cb({});
}
Logger.errlog.log("Vimeo workaround error: ");
Logger.errlog.log(e);