hopefully this fixes it
This commit is contained in:
parent
da7bba8b6e
commit
ed45d27a5f
5
index.js
5
index.js
|
@ -186,8 +186,9 @@ app.ws('/download/:id/:quality', async (ws, req) => {
|
||||||
ws.send('Downloaded video and audio. Merging them together.')
|
ws.send('Downloaded video and audio. Merging them together.')
|
||||||
|
|
||||||
await mergeIt(`./output/${req.params.id}_audio.mp4`, `./output/${req.params.id}_video.mp4`, `./output/${req.params.id}.mp4`)
|
await mergeIt(`./output/${req.params.id}_audio.mp4`, `./output/${req.params.id}_video.mp4`, `./output/${req.params.id}.mp4`)
|
||||||
fs.rmSync(`./output/${req.params.id}_audio.mp4`)
|
|
||||||
fs.rmSync(`./output/${req.params.id}_video.mp4`)
|
if (fs.existsSync(`./output/${req.params.id}_audio.mp4`)) fs.rmSync(`./output/${req.params.id}_audio.mp4`)
|
||||||
|
if (fs.existsSync(`./output/${req.params.id}_video.mp4`)) fs.rmSync(`./output/${req.params.id}_video.mp4`)
|
||||||
|
|
||||||
ws.send('done')
|
ws.send('done')
|
||||||
ws.close()
|
ws.close()
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
"express-ws": "^5.0.2",
|
"express-ws": "^5.0.2",
|
||||||
"ffmpeg-static": "^5.2.0",
|
"ffmpeg-static": "^5.2.0",
|
||||||
"fluent-ffmpeg": "^2.1.3",
|
"fluent-ffmpeg": "^2.1.3",
|
||||||
"youtubei.js": "^11.0.1"
|
"youtubei.js": "^12.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
18
yarn.lock
18
yarn.lock
|
@ -393,10 +393,10 @@ isexe@^2.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
|
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
|
||||||
|
|
||||||
jintr@^3.0.2:
|
jintr@^3.2.0:
|
||||||
version "3.0.2"
|
version "3.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/jintr/-/jintr-3.0.2.tgz#633ecc8da930d25f5004697acb5af4ff36628f26"
|
resolved "https://registry.yarnpkg.com/jintr/-/jintr-3.2.0.tgz#38bfc2311c7ed4412ebe0bfc5c2e700f8f433921"
|
||||||
integrity sha512-5g2EBudeJFOopjAX4exAv5OCCW1DgUISfoioCsm1h9Q9HJ41LmnZ6J52PCsqBlQihsmp0VDuxreAVzM7yk5nFA==
|
integrity sha512-psD1yf05kMKDNsUdW1l5YhO59pHScQ6OIHHb8W5SKSM2dCOFPsqolmIuSHgVA8+3Dc47NJR181CXZ4alCAPTkA==
|
||||||
dependencies:
|
dependencies:
|
||||||
acorn "^8.8.0"
|
acorn "^8.8.0"
|
||||||
|
|
||||||
|
@ -663,12 +663,12 @@ ws@^7.4.6:
|
||||||
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9"
|
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9"
|
||||||
integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==
|
integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==
|
||||||
|
|
||||||
youtubei.js@^11.0.1:
|
youtubei.js@^12.2.0:
|
||||||
version "11.0.1"
|
version "12.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/youtubei.js/-/youtubei.js-11.0.1.tgz#5729bbf2df8dff58c3555140d23ae83c458f0b34"
|
resolved "https://registry.yarnpkg.com/youtubei.js/-/youtubei.js-12.2.0.tgz#54f058b5d0892b5c7e35019e2be6a2a7f7ba4447"
|
||||||
integrity sha512-ZsbOd+5XF2Ofi3FrLMfYd+f9g9H8xswlouFhjhOqbwT68dMJtX6CRGsHNj5VTFCR/+L/865x1lnUlllB2dDDTA==
|
integrity sha512-G+50qrbJCToMYhu8jbaHiS3Vf+RRul+CcDbz3hEGwHkGPh+zLiWwD6SS+YhYF+2/op4ZU5zDYQJrGqJ+wKh7Gw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@bufbuild/protobuf" "^2.0.0"
|
"@bufbuild/protobuf" "^2.0.0"
|
||||||
jintr "^3.0.2"
|
jintr "^3.2.0"
|
||||||
tslib "^2.5.0"
|
tslib "^2.5.0"
|
||||||
undici "^5.19.1"
|
undici "^5.19.1"
|
||||||
|
|
Loading…
Reference in New Issue