From f7ab8bc247d1d37f8980d6f03b45326745c541aa Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Thu, 17 Nov 2022 22:12:00 +0100 Subject: [PATCH] Make downloads limit configurable --- commands/pygg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/pygg.py b/commands/pygg.py index ad71668..a3f64d2 100644 --- a/commands/pygg.py +++ b/commands/pygg.py @@ -16,6 +16,7 @@ parser = argparse.ArgumentParser() parser.add_argument("-u", "--uploader", action="append") parser.add_argument("-y", "--year", type=int) parser.add_argument("-s", "--size", type=int, default=10) +parser.add_argument("-d", "--downloads", type=int, default=20) parser.add_argument("query") args = parser.parse_args() @@ -118,7 +119,7 @@ def search_ygg(query, multi, full): if parse_size(size) > parse_size(f"{args.size}Go"): continue - if int(downloads) < 20: + if int(downloads) < args.downloads: continue if any(word.lower() in name for word in BLACKLIST_WORDS):