From cde3adcbe5960edcd1dfd2d93789486dadd61df8 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 13 Nov 2022 21:18:02 +0100 Subject: [PATCH] Fix year <> None --- commands/pygg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/pygg.py b/commands/pygg.py index f4ef658..051157e 100644 --- a/commands/pygg.py +++ b/commands/pygg.py @@ -83,8 +83,9 @@ def get_files(id): def search_ygg(query, multi): + year = args.year or "" ygg_params = { - "name": f"{query} {args.year}", + "name": f"{query} {year}", "description": "", "file": "", "uploader": "", @@ -128,7 +129,7 @@ def search_ygg(query, multi): if get_files(id) > 1: continue - print(f"{name} {args.year} {link}") + print(f"{name} {year} {link}") exit(0)