From 237e28f0238430d78d6a91118fc68d0ddb35d91d Mon Sep 17 00:00:00 2001 From: Mednoob Date: Wed, 24 Jul 2024 08:29:17 +0900 Subject: [PATCH] feat(index): add file mode for play-dl zip file --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index d9123a17b..8ae67066d 100644 --- a/index.js +++ b/index.js @@ -112,7 +112,11 @@ const streamStrategy = process.env.STREAM_STRATEGY; if (streamStrategy !== "play-dl") await downloadExecutable(); if (streamStrategy === "play-dl" && !existsSync(nodePath.resolve(process.cwd(), "play-dl-fix"))) { console.log("[INFO] Downloading play-dl fix..."); - writeFileSync(nodePath.resolve(process.cwd(), "temp.zip"), await got.get("https://github.com/YuzuZensai/play-dl-test/archive/2bfbfe6decd68261747ba55800319f9906f12b03.zip").buffer()); + writeFileSync( + nodePath.resolve(process.cwd(), "temp.zip"), + await got.get("https://github.com/YuzuZensai/play-dl-test/archive/2bfbfe6decd68261747ba55800319f9906f12b03.zip").buffer(), + { mode: 0o777 } + ); console.log("[INFO] Extracting play-dl fix..."); mkdirSync(nodePath.resolve(process.cwd(), "play-dl-fix"), { recursive: true });