From b5ba86dd7578df49ee622d8c81649d033b44049c Mon Sep 17 00:00:00 2001 From: wukko Date: Thu, 13 Feb 2025 17:09:03 +0600 Subject: [PATCH] api/youtube: return a proper error if the video is "inappropriate" --- api/src/processing/services/youtube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/processing/services/youtube.js b/api/src/processing/services/youtube.js index 3240c163..a4c54a82 100644 --- a/api/src/processing/services/youtube.js +++ b/api/src/processing/services/youtube.js @@ -193,7 +193,7 @@ export default async function (o) { if (playability.reason.endsWith("bot")) { 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" } } if (playability?.error_screen?.reason?.text === "Private video") {