From 414f77c8d84bbfcc0c356fbb2352d7cd9d30f5ef Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 8 Sep 2021 16:55:42 +0200 Subject: [PATCH] Don't force youtube-dl host --- server/helpers/youtube-dl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts index 3c80e7d41..3072affed 100644 --- a/server/helpers/youtube-dl.ts +++ b/server/helpers/youtube-dl.ts @@ -351,7 +351,7 @@ class YoutubeDL { } const newUrl = result.headers.location - const newVersion = /yt-dl\.org\/downloads\/(\d{4}\.\d\d\.\d\d(\.\d)?)\/youtube-dl/.exec(newUrl)[1] + const newVersion = /\/(\d{4}\.\d\d\.\d\d(\.\d)?)\/youtube-dl$/.exec(newUrl)[1] const downloadFileStream = got.stream(newUrl) const writeStream = createWriteStream(bin, { mode: 493 })