fix: stop the extractor-args from overwriting eachother
Some checks are pending
build / build (push) Waiting to run
Some checks are pending
build / build (push) Waiting to run
This commit is contained in:
parent
6ff2d53c2d
commit
db643947dc
|
|
@ -11,6 +11,7 @@ import (
|
|||
"os/exec"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"git.meatbag.se/varl/subsyt/internal/config"
|
||||
|
|
@ -98,19 +99,18 @@ func Youtube(d Download, p config.Provider) {
|
|||
args = append(args, "--no-cookies")
|
||||
}
|
||||
|
||||
var youtubeArgs []string
|
||||
if p.Po_token != "" {
|
||||
args = append(args, "--extractor-args")
|
||||
args = append(args, fmt.Sprintf("youtube:po_token=web.gvs+%s", p.Po_token))
|
||||
youtubeArgs = append(youtubeArgs, fmt.Sprintf("po_token=web.gvs+%s", p.Po_token))
|
||||
}
|
||||
|
||||
if p.Bgutil_server != "" {
|
||||
args = append(args, "--extractor-args")
|
||||
args = append(args, fmt.Sprintf("youtube:getpot_bgutil_baseurl=%s", p.Bgutil_server))
|
||||
youtubeArgs = append(youtubeArgs, fmt.Sprintf("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))
|
||||
youtubeArgs = append(youtubeArgs, fmt.Sprintf("player_client=%s", p.Player_client))
|
||||
}
|
||||
if len(youtubeArgs) > 0 {
|
||||
args = append(args, "--extractor-args", fmt.Sprintf("youtube:%s", strings.Join(youtubeArgs, ";")))
|
||||
}
|
||||
|
||||
if p.Output_path_template != "" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue