From 258bf784bbbfaa66313aa18ed874f4572718794b Mon Sep 17 00:00:00 2001 From: Viktor Varland Date: Mon, 8 Sep 2025 12:46:24 +0200 Subject: [PATCH] feat: add control over player_client options --- Containerfile | 3 ++- internal/config/config.go | 1 + internal/dl/dl.go | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 869c073..dd789c8 100644 --- a/Containerfile +++ b/Containerfile @@ -63,7 +63,8 @@ COPY <<-EOT /data/config.json "cookies_file": "", "opml_file": "/data/opml.xml", "po_token": "", - "bgutil_server": "http://bgutil:4416" + "bgutil_server": "http://bgutil:4416", + "player_client": "default,-ios" } } } diff --git a/internal/config/config.go b/internal/config/config.go index d91bd98..dc320d9 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -19,6 +19,7 @@ type Provider struct { Po_token string Verbose bool Bgutil_server string + Player_client string } type Config struct { diff --git a/internal/dl/dl.go b/internal/dl/dl.go index a33bbe7..748642f 100644 --- a/internal/dl/dl.go +++ b/internal/dl/dl.go @@ -110,6 +110,11 @@ func Youtube(d Download, p config.Provider) { args = append(args, fmt.Sprintf("youtube:getpot_bgutil_baseurl=%s", p.Bgutil_server)) } + if p.Player_client != "" { + args = append(args, "--extractor-args") + args = append(args, fmt.Sprintf("youtube:player_client=%s", p.Player_client) + } + args = append(args, "--format-sort") if p.Quality != "" { args = append(args, p.Quality)