api/youtube: return a proper error if the video is "inappropriate"
This commit is contained in:
@@ -193,7 +193,7 @@ export default async function (o) {
|
|||||||
if (playability.reason.endsWith("bot")) {
|
if (playability.reason.endsWith("bot")) {
|
||||||
return { error: "youtube.login" }
|
return { error: "youtube.login" }
|
||||||
}
|
}
|
||||||
if (playability.reason.endsWith("age")) {
|
if (playability.reason.endsWith("age") || playability.reason.endsWith("inappropriate for some users.")) {
|
||||||
return { error: "content.video.age" }
|
return { error: "content.video.age" }
|
||||||
}
|
}
|
||||||
if (playability?.error_screen?.reason?.text === "Private video") {
|
if (playability?.error_screen?.reason?.text === "Private video") {
|
||||||
|
|||||||
Reference in New Issue
Block a user