refactor: rename and rely on yt-dlp defauls more
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
e236b4d043
commit
49b8dd4dd4
|
|
@ -54,7 +54,8 @@ COPY <<-EOT /data/config.json
|
||||||
"youtube": {
|
"youtube": {
|
||||||
"verbose": false,
|
"verbose": false,
|
||||||
"cmd": "/home/subsyt/.local/bin/yt-dlp",
|
"cmd": "/home/subsyt/.local/bin/yt-dlp",
|
||||||
"quality": "res:1080",
|
"format": "",
|
||||||
|
"format_sort": "",
|
||||||
"output_path_template": "s%(upload_date>%Y)s/%(channel)s.s%(upload_date>%Y)Se%(upload_date>%m%d)S.%(title)s.%(id)s.%(ext)s",
|
"output_path_template": "s%(upload_date>%Y)s/%(channel)s.s%(upload_date>%Y)Se%(upload_date>%m%d)S.%(title)s.%(id)s.%(ext)s",
|
||||||
"url": "https://www.youtube.com",
|
"url": "https://www.youtube.com",
|
||||||
"throttle": 5,
|
"throttle": 5,
|
||||||
|
|
@ -62,7 +63,7 @@ COPY <<-EOT /data/config.json
|
||||||
"opml_file": "/data/opml.xml",
|
"opml_file": "/data/opml.xml",
|
||||||
"po_token": "",
|
"po_token": "",
|
||||||
"bgutil_server": "http://bgutil:4416",
|
"bgutil_server": "http://bgutil:4416",
|
||||||
"player_client": "mweb"
|
"player_client": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,8 @@ Full `config.json`:
|
||||||
"youtube": {
|
"youtube": {
|
||||||
"verbose": false,
|
"verbose": false,
|
||||||
"cmd": "./yt-dlp",
|
"cmd": "./yt-dlp",
|
||||||
"quality": "res:1080",
|
"format": "best",
|
||||||
|
"format_sort": "res:1080",
|
||||||
"output_path_template": "s%(upload_date>%Y)s/%(channel)s.s%(upload_date>%Y)Se%(upload_date>%m%d)S.%(title)s.%(id)s.%(ext)s",
|
"output_path_template": "s%(upload_date>%Y)s/%(channel)s.s%(upload_date>%Y)Se%(upload_date>%m%d)S.%(title)s.%(id)s.%(ext)s",
|
||||||
"url": "https://www.youtube.com",
|
"url": "https://www.youtube.com",
|
||||||
"throttle": 5,
|
"throttle": 5,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ type Provider struct {
|
||||||
Cmd string
|
Cmd string
|
||||||
Cookies_file string
|
Cookies_file string
|
||||||
Opml_file string
|
Opml_file string
|
||||||
Quality string
|
Format string
|
||||||
|
Format_sort string
|
||||||
Output_path_template string
|
Output_path_template string
|
||||||
Po_token string
|
Po_token string
|
||||||
Verbose bool
|
Verbose bool
|
||||||
|
|
|
||||||
|
|
@ -85,10 +85,12 @@ func Youtube(d Download, p config.Provider) {
|
||||||
}
|
}
|
||||||
args = append(args, dArgs...)
|
args = append(args, dArgs...)
|
||||||
|
|
||||||
if p.Quality != "" {
|
if p.Format != "" {
|
||||||
args = append(args, "--format-sort", p.Quality)
|
args = append(args, "--format", p.Format)
|
||||||
} else {
|
}
|
||||||
args = append(args, "--format-sort", "res:1080")
|
|
||||||
|
if p.Format_sort != "" {
|
||||||
|
args = append(args, "--format-sort", p.Format_sort)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,6 @@ type Entry struct {
|
||||||
MediaGroup MediaGroup `xml:"group"`
|
MediaGroup MediaGroup `xml:"group"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func RssLoad(data []byte) (Feed, error) {
|
func RssLoad(data []byte) (Feed, error) {
|
||||||
feed := Feed{}
|
feed := Feed{}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue