mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Change -s default value
This commit is contained in:
parent
b99c3395f1
commit
3f12cbae95
1 changed files with 3 additions and 5 deletions
|
|
@ -144,7 +144,7 @@ func init() {
|
||||||
Cmd.Flags().StringSliceVarP(&archiveSubLanguagesFlag,
|
Cmd.Flags().StringSliceVarP(&archiveSubLanguagesFlag,
|
||||||
"sublang",
|
"sublang",
|
||||||
"s",
|
"s",
|
||||||
[]string{},
|
utils.LocalesAsStrings(),
|
||||||
"Subtitles langs which should be downloaded. Can be used multiple times")
|
"Subtitles langs which should be downloaded. Can be used multiple times")
|
||||||
|
|
||||||
cwd, _ := os.Getwd()
|
cwd, _ := os.Getwd()
|
||||||
|
|
@ -534,11 +534,9 @@ func archiveDownloadSubtitles(filename string, subtitles ...*crunchyroll.Subtitl
|
||||||
var files []string
|
var files []string
|
||||||
|
|
||||||
for _, subtitle := range subtitles {
|
for _, subtitle := range subtitles {
|
||||||
if len(archiveSubLanguagesFlag) > 0 {
|
|
||||||
if !utils.ElementInSlice(string(subtitle.Locale), archiveSubLanguagesFlag) {
|
if !utils.ElementInSlice(string(subtitle.Locale), archiveSubLanguagesFlag) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
f, err := os.CreateTemp("", fmt.Sprintf("%s_%s_subtitle_*.ass", filename, subtitle.Locale))
|
f, err := os.CreateTemp("", fmt.Sprintf("%s_%s_subtitle_*.ass", filename, subtitle.Locale))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue