mirror of https://github.com/calzoneman/sync.git
Check for videos where embedding is disabled
This commit is contained in:
parent
8ba5743bc2
commit
69ac0b39ad
|
@ -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
|
Fri Sep 27 10:27 2013 CDT
|
||||||
* lib/channel.js: Change the link regex, change the way 'affects links'
|
* lib/channel.js: Change the link regex, change the way 'affects links'
|
||||||
works. The default link filter will only transform a link of no
|
works. The default link filter will only transform a link of no
|
||||||
|
|
|
@ -91,6 +91,18 @@ module.exports = function (Server) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(data);
|
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 seconds = data.entry.media$group.yt$duration.seconds;
|
||||||
var title = data.entry.title.$t;
|
var title = data.entry.title.$t;
|
||||||
var media = new Media(id, title, seconds, "yt");
|
var media = new Media(id, title, seconds, "yt");
|
||||||
|
|
Loading…
Reference in New Issue