feat(media): fallback to lower quality if requested format is unavailable
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/mathismqn/godeez/internal/config"
|
||||
@@ -53,6 +54,8 @@ func newDownloadCmd(resourceType string) *cobra.Command {
|
||||
}
|
||||
cmd.SetContext(context.WithValue(cmd.Context(), "appConfig", appConfig))
|
||||
|
||||
opts.Quality = strings.ToLower(opts.Quality)
|
||||
|
||||
return opts.Validate()
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
||||
Reference in New Issue
Block a user