Show output filename in the cli

This commit is contained in:
ChaoticByte 2025-03-08 22:09:57 +01:00
parent b19eba0560
commit 5e6884af66
No known key found for this signature in database
2 changed files with 7 additions and 6 deletions

View file

@ -1 +1 @@
2.0.0 2.0.1

View file

@ -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) {