feat: add output folder flag

This commit is contained in:
2026-02-13 07:21:50 +01:00
parent bded51830c
commit 21741d6bc0
2 changed files with 16 additions and 5 deletions

11
main.go
View File

@@ -11,7 +11,8 @@ import (
)
func main() {
var song_url string
var song_url, output_folder string
application := app.NewApp()
cmd := &cli.Command{
@@ -23,9 +24,15 @@ func main() {
Usage: "Download a song/playlist",
Destination: &song_url,
},
&cli.StringFlag{
Name: "output",
Aliases: []string{"o"},
Usage: "Set output folder",
Destination: &output_folder,
},
},
Action: func(ctx context.Context, cmd *cli.Command) error {
err := pkg.Download(application, song_url)
err := pkg.Download(application, song_url, output_folder)
return err
},
}