Skip to content

Commit

Permalink
feat: Warn when maxConcurrency is set to 1 on concurrent strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
caffeine-addictt committed Apr 8, 2024
1 parent e5a85f3 commit 27d635c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ var getCommand = &cobra.Command{
Short: "Get and download videos",
Long: `Get and download videos from passed file and url(s)`,
Run: func(cmd *cobra.Command, args []string) {
// Warn on inefficient settings
if getFlags.maxConcurrency == 1 && getFlags.strategy == strategyConcurrent {
fmt.Println("WARNING: Setting -m to 1 with -s concurrent may not be efficient, please consider using -s synchronous instead.")
}

// Validate working directory exists and is writable
dirPath, err := utils.ValidateDirectory(workingDir)
if err != nil {
Expand Down

0 comments on commit 27d635c

Please sign in to comment.