fixup! add support for an external videoplayback proxy
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m7s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m7s
This commit is contained in:
parent
9512877ff2
commit
34c9df22e7
2 changed files with 12 additions and 6 deletions
|
@ -95,9 +95,12 @@ dashManifest.get("/:videoId", async (c) => {
|
|||
let dashUrl = url;
|
||||
if (local) {
|
||||
// Can't create URL type without host part
|
||||
dashUrl = (konfigStore.get(
|
||||
"networking.external_videoplayback_proxy",
|
||||
) as string ?? "") +
|
||||
dashUrl = (
|
||||
Deno.env.get("EXTERNAL_VIDEOPLAYBACK_PROXY") ||
|
||||
(konfigStore.get(
|
||||
"networking.external_videoplayback_proxy",
|
||||
) as string ?? "")
|
||||
) +
|
||||
(dashUrl.pathname + dashUrl.search + "&host=" +
|
||||
dashUrl.host) as unknown as URL;
|
||||
if (konfigStore.get("networking.ump") as boolean) {
|
||||
|
|
|
@ -63,9 +63,12 @@ latestVersion.get("/", async (c) => {
|
|||
const itagUrlParsed = new URL(itagUrl);
|
||||
let urlToRedirect = itagUrlParsed.toString();
|
||||
if (local) {
|
||||
urlToRedirect = (konfigStore.get(
|
||||
"networking.external_videoplayback_proxy",
|
||||
) as string ?? "") +
|
||||
urlToRedirect = (
|
||||
Deno.env.get("EXTERNAL_VIDEOPLAYBACK_PROXY") ||
|
||||
(konfigStore.get(
|
||||
"networking.external_videoplayback_proxy",
|
||||
) as string ?? "")
|
||||
) +
|
||||
itagUrlParsed.pathname + itagUrlParsed.search +
|
||||
"&host=" + itagUrlParsed.host;
|
||||
}
|
||||
|
|
Reference in a new issue