Add Google Docs checks for missing duration/title

This commit is contained in:
calzoneman 2014-08-15 00:27:51 -05:00
parent ecca806a58
commit 3446eb5357

View file

@ -701,6 +701,16 @@ var Getters = {
data[kv[0]] = kv[1];
});
if (!data.hasOwnProperty("title")) {
return callback("Returned HTML is missing the video title. Are you " +
"sure the video is done processing?");
}
if (!data.hasOwnProperty("length_seconds")) {
return callback("Returned HTML is missing the video duration. Are you " +
"sure the video is done processing?");
}
var title = data.title;
var seconds = parseInt(data.length_seconds);