Fix crashing
This commit is contained in:
parent
2cc0fbffcf
commit
374e1f7036
3 changed files with 12 additions and 12 deletions
|
@ -43,7 +43,7 @@ expressManager.app.get("/download", async (req, res) => {
|
|||
while (videoFormat == undefined) {
|
||||
for (let i = 0; i < info.formats.length; i++) {
|
||||
const format = info.formats[i];
|
||||
if (format.hasVideo && !format.hasAudio && format.height.toString() == qualityLabel.toString()) {
|
||||
if (format.hasVideo && !format.hasAudio && format.height && format.height.toString() == qualityLabel.toString()) {
|
||||
videoFormat = format
|
||||
continue
|
||||
}
|
||||
|
|
20
package-lock.json
generated
20
package-lock.json
generated
|
@ -9,7 +9,7 @@
|
|||
"version": "4.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@distube/ytdl-core": "^4.13.7",
|
||||
"@distube/ytdl-core": "^4.14.4",
|
||||
"child_process": "^1.0.2",
|
||||
"express": "^4.18.2",
|
||||
"ffmpeg-static": "^5.2.0"
|
||||
|
@ -30,9 +30,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@distube/ytdl-core": {
|
||||
"version": "4.13.7",
|
||||
"resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.13.7.tgz",
|
||||
"integrity": "sha512-xpovwZVPwQ0R4Mrwt/fhh1rqmBjiZ5qj30ck5kz+mQJ5XPzW9dUiTDz89qCxO3YvgbCAqaC5BNNnWiFC2uCV5Q==",
|
||||
"version": "4.14.4",
|
||||
"resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.14.4.tgz",
|
||||
"integrity": "sha512-dHb4GW3qATIjRsS6VIhm3Pop7FdUcDFhsnyQlsPeXW7UhTPuNS0BmraKiTpFbpp0Ky+rxBQjJBfPRFsM+dT1fg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"http-cookie-agent": "^6.0.5",
|
||||
|
@ -40,10 +40,10 @@
|
|||
"miniget": "^4.2.3",
|
||||
"sax": "^1.4.1",
|
||||
"tough-cookie": "^4.1.4",
|
||||
"undici": "^6.19.2"
|
||||
"undici": "five"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
"node": ">=14.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/distubejs/ytdl-core?sponsor"
|
||||
|
@ -970,16 +970,16 @@
|
|||
}
|
||||
},
|
||||
"@distube/ytdl-core": {
|
||||
"version": "4.13.7",
|
||||
"resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.13.7.tgz",
|
||||
"integrity": "sha512-xpovwZVPwQ0R4Mrwt/fhh1rqmBjiZ5qj30ck5kz+mQJ5XPzW9dUiTDz89qCxO3YvgbCAqaC5BNNnWiFC2uCV5Q==",
|
||||
"version": "4.14.4",
|
||||
"resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.14.4.tgz",
|
||||
"integrity": "sha512-dHb4GW3qATIjRsS6VIhm3Pop7FdUcDFhsnyQlsPeXW7UhTPuNS0BmraKiTpFbpp0Ky+rxBQjJBfPRFsM+dT1fg==",
|
||||
"requires": {
|
||||
"http-cookie-agent": "^6.0.5",
|
||||
"m3u8stream": "^0.8.6",
|
||||
"miniget": "^4.2.3",
|
||||
"sax": "^1.4.1",
|
||||
"tough-cookie": "^4.1.4",
|
||||
"undici": "^6.19.2"
|
||||
"undici": "five"
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/Violets-puragtory/YoutubeConverter#readme",
|
||||
"dependencies": {
|
||||
"@distube/ytdl-core": "^4.13.7",
|
||||
"@distube/ytdl-core": "^4.14.4",
|
||||
"child_process": "^1.0.2",
|
||||
"express": "^4.18.2",
|
||||
"ffmpeg-static": "^5.2.0"
|
||||
|
|
Loading…
Reference in a new issue