Made get-info save if yt video is age-restricted and made playlist refuse to add age-restricted videos
This commit is contained in:
parent
9e3c23c58a
commit
7c3d2f74ed
|
@ -973,6 +973,10 @@ PlaylistModule.prototype._addItem = function (media, data, user, cb) {
|
|||
}
|
||||
}
|
||||
|
||||
if (media.meta.rating) {
|
||||
return qfail("Cannot add age restricted videos because google sucks");
|
||||
}
|
||||
|
||||
/* Warn about blocked countries */
|
||||
if (media.meta.restricted) {
|
||||
user.socket.emit("queueWarn", {
|
||||
|
|
|
@ -71,6 +71,9 @@ var Getters = {
|
|||
if (video.meta.blocked) {
|
||||
meta.restricted = video.meta.blocked;
|
||||
}
|
||||
if (video.meta.ytRating) {
|
||||
meta.rating = video.meta.ytRating;
|
||||
}
|
||||
|
||||
var media = new Media(video.id, video.title, video.duration, "yt", meta);
|
||||
callback(false, media);
|
||||
|
|
Loading…
Reference in a new issue