im stupid

This commit is contained in:
localhost 2024-03-30 18:04:00 +01:00
parent 23fdba356e
commit 7ce487c8e6
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ const hr = require('@tsmx/human-readable')
async function downloadVideo(url, ws, id) { async function downloadVideo(url, ws, id) {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
let quality = '720p' let quality = '720'
const video = await metadata.getVideoMetadata(id) const video = await metadata.getVideoMetadata(id)
if (video.error) { if (video.error) {
return resolve({ return resolve({
@ -13,7 +13,7 @@ async function downloadVideo(url, ws, id) {
fail: true fail: true
}) })
} }
if (video.basic_info.duration >= 900) quality = '360p' // 15 minutes if (video.basic_info.duration >= 900) quality = '360' // 15 minutes
const downloadJson = await metadata.getVideoDownload(url, quality) const downloadJson = await metadata.getVideoDownload(url, quality)
if (downloadJson.status == 'error') { if (downloadJson.status == 'error') {