mirror of
https://github.com/Superredstone/spotiflac-cli.git
synced 2026-03-07 20:18:07 +01:00
feat: add output folder flag
This commit is contained in:
11
main.go
11
main.go
@@ -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
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user