mirror of
https://github.com/wukko/cobalt.git
synced 2025-04-29 22:14:26 +02:00
api/youtube: return a proper error if the video is "inappropriate"
This commit is contained in:
parent
33ce314775
commit
b5ba86dd75
@ -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") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user