Show output filename in the cli
This commit is contained in:
parent
b19eba0560
commit
5e6884af66
2 changed files with 7 additions and 6 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.0.0
|
2.0.1
|
11
cli/cli.go
11
cli/cli.go
|
@ -177,11 +177,16 @@ func CliRun() int {
|
||||||
CliAvailableFormats(streamEp.Formats)
|
CliAvailableFormats(streamEp.Formats)
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
CliShowFormat(format)
|
cli.InfoMessage(fmt.Sprintf("Format: %v", format.Name))
|
||||||
if args.ChapterIdx >= 0 {
|
if args.ChapterIdx >= 0 {
|
||||||
cli.InfoMessage(fmt.Sprintf("Chapter: %v. %v", cliArgs.ChapterNum, streamEp.Chapters[args.ChapterIdx].Title))
|
cli.InfoMessage(fmt.Sprintf("Chapter: %v. %v", cliArgs.ChapterNum, streamEp.Chapters[args.ChapterIdx].Title))
|
||||||
}
|
}
|
||||||
|
// We already set the output file correctly so we can output it
|
||||||
|
if args.OutputFile == "" {
|
||||||
|
args.OutputFile = streamEp.GetProposedFilename(args.ChapterIdx)
|
||||||
|
}
|
||||||
// Start Download
|
// Start Download
|
||||||
|
cli.InfoMessage(fmt.Sprintf("Output: %v", args.OutputFile))
|
||||||
fmt.Print("\n")
|
fmt.Print("\n")
|
||||||
if err = streamEp.Download(args, &cli, make(chan os.Signal, 1)); err != nil {
|
if err = streamEp.Download(args, &cli, make(chan os.Signal, 1)); err != nil {
|
||||||
cli.ErrorMessage(err)
|
cli.ErrorMessage(err)
|
||||||
|
@ -205,10 +210,6 @@ func CliAvailableFormats(formats []core.VideoFormat) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func CliShowFormat(format core.VideoFormat) {
|
|
||||||
fmt.Printf("Format: %v\n", format.Name)
|
|
||||||
}
|
|
||||||
|
|
||||||
type Cli struct{}
|
type Cli struct{}
|
||||||
|
|
||||||
func (cli *Cli) DownloadProgress(progress float32, rate float64, delaying bool, waiting bool, retries int, title string) {
|
func (cli *Cli) DownloadProgress(progress float32, rate float64, delaying bool, waiting bool, retries int, title string) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue