Made get-info save if yt video is age-restricted and made playlist refuse to add age-restricted videos

This commit is contained in:
aleves64 2020-12-31 16:50:05 +02:00 committed by Calvin Montgomery
parent 9e3c23c58a
commit 7c3d2f74ed
2 changed files with 7 additions and 0 deletions

View file

@ -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", {