Make downloads limit configurable
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2022-11-17 22:12:00 +01:00
parent 916f2b8b47
commit f7ab8bc247

View File

@ -16,6 +16,7 @@ parser = argparse.ArgumentParser()
parser.add_argument("-u", "--uploader", action="append") parser.add_argument("-u", "--uploader", action="append")
parser.add_argument("-y", "--year", type=int) parser.add_argument("-y", "--year", type=int)
parser.add_argument("-s", "--size", type=int, default=10) parser.add_argument("-s", "--size", type=int, default=10)
parser.add_argument("-d", "--downloads", type=int, default=20)
parser.add_argument("query") parser.add_argument("query")
args = parser.parse_args() args = parser.parse_args()
@ -118,7 +119,7 @@ def search_ygg(query, multi, full):
if parse_size(size) > parse_size(f"{args.size}Go"): if parse_size(size) > parse_size(f"{args.size}Go"):
continue continue
if int(downloads) < 20: if int(downloads) < args.downloads:
continue continue
if any(word.lower() in name for word in BLACKLIST_WORDS): if any(word.lower() in name for word in BLACKLIST_WORDS):