Use year filter
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2022-11-14 14:51:25 +01:00
parent cde3adcbe5
commit fc8cbd9540

View File

@ -83,9 +83,8 @@ def get_files(id):
def search_ygg(query, multi):
year = args.year or ""
ygg_params = {
"name": f"{query} {year}",
"name": query,
"description": "",
"file": "",
"uploader": "",
@ -118,6 +117,9 @@ def search_ygg(query, multi):
if any(word.lower() in name for word in BLACKLIST_WORDS):
continue
if args.year and args.year not in name:
continue
if args.uploader and not any(
uploader.lower() in name for uploader in args.uploader
):
@ -129,7 +131,7 @@ def search_ygg(query, multi):
if get_files(id) > 1:
continue
print(f"{name} {year} {link}")
print(f"{name} {link}")
exit(0)