wierd bug fix

This commit is contained in:
localhost 2024-06-10 20:05:37 +02:00
parent 405c28afd6
commit 884174e4f5
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@ async function downloadVideo(url, ws, id) {
let prevBytes = 0 let prevBytes = 0
let speed = 0 let speed = 0
const alreadyPrecentages = [] const alreadyPrecentages = []
const download = wget.download(downloadJson.url, `./videos/${id}.mp4`, {
const target = Array.isArray(downloadJson.url) ? downloadJson.url[0] : downloadJson.url
const download = wget.download(target, `./videos/${id}.mp4`, {
proxy: 'http://gluetun:8888' proxy: 'http://gluetun:8888'
}) })