mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +01:00
api/url: return a diff error when youtube is disabled on main instance
This commit is contained in:
parent
f1916cef6e
commit
112866096c
1 changed files with 5 additions and 0 deletions
|
@ -181,6 +181,11 @@ export function extract(url) {
|
|||
}
|
||||
|
||||
if (!env.enabledServices.has(host)) {
|
||||
// show a different message when youtube is disabled on official instances
|
||||
// as it only happens when shit hits the fan
|
||||
if (new URL(env.apiURL).hostname.endsWith(".imput.net") && host === "youtube") {
|
||||
return { error: "youtube.temporary_disabled" };
|
||||
}
|
||||
return { error: "service.disabled" };
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue