From 87a8f66f718690bb11f9a0ca605a5da290e889ab Mon Sep 17 00:00:00 2001 From: localhost Date: Sat, 29 Jun 2024 13:48:25 +0200 Subject: [PATCH] changing quality stuff --- utils/ytdlp.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/ytdlp.js b/utils/ytdlp.js index 85588da..ffea5d6 100644 --- a/utils/ytdlp.js +++ b/utils/ytdlp.js @@ -3,7 +3,7 @@ const metadata = require('./metadata.js') async function downloadVideo(url, ws, id) { return new Promise(async (resolve, reject) => { - let quality = '720' + let quality = '720p60' const video = await metadata.getVideoMetadata(id) if (video.error) { return resolve({ @@ -11,10 +11,10 @@ async function downloadVideo(url, ws, id) { fail: true }) } - if (video.basic_info.duration >= 900) quality = '360' // 15 minutes + if (video.basic_info.duration >= 900) quality = '360p' // 15 minutes let isDownloading = true - const downloader = new WebSocket(`ws://${process.env.METADATA.replace('http://', '')}/download/${id}/${quality}p`) + const downloader = new WebSocket(`ws://${process.env.METADATA.replace('http://', '')}/download/${id}/${quality}`) downloader.on('message', async function message(data) { const text = data.toString() if (text == 'done') {