Фикс игнорирования флагов -f/-u/-c при наличии playlists.ini
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"axenov/iptv-checker/app/logger"
|
||||
"github.com/spf13/cobra"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
// checkCmd represents the file command
|
||||
@@ -25,14 +24,10 @@ var checkCmd = &cobra.Command{
|
||||
files, _ := cmd.Flags().GetStringSlice("file")
|
||||
urls, _ := cmd.Flags().GetStringSlice("url")
|
||||
codes, _ := cmd.Flags().GetStringSlice("code")
|
||||
|
||||
if len(files) < 1 && len(urls) < 1 && len(codes) < 1 {
|
||||
log.Println("ERROR: You should provide at least one of --file, --url or --code flags")
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
lists := checker.PrepareListsToCheck(files, urls, codes)
|
||||
|
||||
checker.CheckPlaylists(lists)
|
||||
log.Println("Done!")
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user