From: Chocobozzz Date: Wed, 8 Sep 2021 14:55:42 +0000 (+0200) Subject: Don't force youtube-dl host X-Git-Tag: v3.4.0~22 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=414f77c8d84bbfcc0c356fbb2352d7cd9d30f5ef;p=github%2FChocobozzz%2FPeerTube.git Don't force youtube-dl host --- 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 })