From fe96551d7a00ff742e789c8c36a30ac81684bd1f Mon Sep 17 00:00:00 2001 From: Emilien <4016501+unixfox@users.noreply.github.com> Date: Mon, 18 Nov 2024 00:08:30 +0100 Subject: [PATCH] reformat file --- deno.json | 3 ++- deno.lock | 16 ++++++++++++++-- src/routes/videoPlaybackProxy.ts | 9 +++++++-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/deno.json b/deno.json index cc7fe5f..ff948c6 100644 --- a/deno.json +++ b/deno.json @@ -16,7 +16,8 @@ "@willsoto/node-konfig-core": "npm:@willsoto/node-konfig-core@5.0.0", "@willsoto/node-konfig-file": "npm:@willsoto/node-konfig-file@3.0.0", "@willsoto/node-konfig-toml-parser": "npm:@willsoto/node-konfig-toml-parser@3.0.0", - "youtubePlayerReq": "./src/lib/helpers/youtubePlayerReq.ts" + "youtubePlayerReq": "./src/lib/helpers/youtubePlayerReq.ts", + "googlevideo": "npm:googlevideo@2.0.0" }, "unstable": ["cron", "kv", "http"] } diff --git a/deno.lock b/deno.lock index 3b11d0b..3ff6cda 100644 --- a/deno.lock +++ b/deno.lock @@ -13,7 +13,8 @@ "npm:@willsoto/node-konfig-core@5.0.0": "npm:@willsoto/node-konfig-core@5.0.0", "npm:@willsoto/node-konfig-file@3.0.0": "npm:@willsoto/node-konfig-file@3.0.0_@willsoto+node-konfig-core@5.0.0", "npm:@willsoto/node-konfig-toml-parser@3.0.0": "npm:@willsoto/node-konfig-toml-parser@3.0.0_@willsoto+node-konfig-core@5.0.0", - "npm:acorn@^8.8.0": "npm:acorn@8.13.0" + "npm:acorn@^8.8.0": "npm:acorn@8.13.0", + "npm:googlevideo@2.0.0": "npm:googlevideo@2.0.0" }, "jsr": { "@hono/hono@4.6.5": { @@ -37,6 +38,10 @@ } }, "npm": { + "@bufbuild/protobuf@2.2.2": { + "integrity": "sha512-UNtPCbrwrenpmrXuRwn9jYpPoweNXj8X5sMvYgsqYyaH8jQ6LfUJSk3dJLnBK+6sfYPrF4iAIo5sd5HQ+tg75A==", + "dependencies": {} + }, "@types/estree@1.0.6": { "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dependencies": {} @@ -73,6 +78,12 @@ "integrity": "sha512-ehw7t3twohGiMTxARX0AcFiUxndXLhnIBWbnRnHtfde2jRywlPpPB/o3s9YSptXPj6tkOG0fzET4CUUx4GIpEg==", "dependencies": {} }, + "googlevideo@2.0.0": { + "integrity": "sha512-OVlNWZ07TPIelaEII6mH9od+Cxljl7P4AzhEYVNN5d4FhFT9L5otpcLtgvraTE9u69KfVVw+L4pVeczArcD33w==", + "dependencies": { + "@bufbuild/protobuf": "@bufbuild/protobuf@2.2.2" + } + }, "lodash@4.17.21": { "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dependencies": {} @@ -742,7 +753,8 @@ "jsr:@hono/hono@^4.6.5", "npm:@willsoto/node-konfig-core@5.0.0", "npm:@willsoto/node-konfig-file@3.0.0", - "npm:@willsoto/node-konfig-toml-parser@3.0.0" + "npm:@willsoto/node-konfig-toml-parser@3.0.0", + "npm:googlevideo@2.0.0" ] } } diff --git a/src/routes/videoPlaybackProxy.ts b/src/routes/videoPlaybackProxy.ts index 78b667f..5fcfe4e 100644 --- a/src/routes/videoPlaybackProxy.ts +++ b/src/routes/videoPlaybackProxy.ts @@ -16,9 +16,14 @@ videoPlaybackProxy.get("/", async (c) => { }); } - if (expire == undefined || Number(expire) < Number(Date.now().toString().slice(0, -3))){ + if ( + expire == undefined || + Number(expire) < Number(Date.now().toString().slice(0, -3)) + ) { throw new HTTPException(400, { - res: new Response("Expire query string undefined or videoplayback URL has expired."), + res: new Response( + "Expire query string undefined or videoplayback URL has expired.", + ), }); }