diff --git a/changelog b/changelog index 7e1d3292..07366dc1 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +Sun Sep 29 21:30 2013 CDT + * lib/get-info.js: Add an extra check to ytv2 to make sure embedding is + allowed. If not, send a queueFail. + Fri Sep 27 10:27 2013 CDT * lib/channel.js: Change the link regex, change the way 'affects links' works. The default link filter will only transform a link of no diff --git a/lib/get-info.js b/lib/get-info.js index 613dec23..9e93f7fe 100644 --- a/lib/get-info.js +++ b/lib/get-info.js @@ -91,6 +91,18 @@ module.exports = function (Server) { try { data = JSON.parse(data); + if (data.entry.yt$accessControl) { + var ac = data.entry.yt$accessControl; + for (var i = 0; i < ac.length; i++) { + if (ac[i].action === "embed") { + if (ac[i].permission === "denied") { + callback("Embedding disabled", null); + return; + } + break; + } + } + } var seconds = data.entry.media$group.yt$duration.seconds; var title = data.entry.title.$t; var media = new Media(id, title, seconds, "yt");