mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-24 03:58:49 +01:00
api/youtube: return a proper error if the video is "inappropriate"
This commit is contained in:
parent
33ce314775
commit
b5ba86dd75
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue