diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index bf63046..5314459 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -480,7 +480,7 @@ def run_search(self, helper, media, result): year = date.year # Make sure this isn't a pre-order listing - if helper.is_year_in_future(year): + if helper.check_if_preorder(date): continue # Score the album name diff --git a/Contents/Code/search_tools.py b/Contents/Code/search_tools.py index 4d6b240..0c5b704 100644 --- a/Contents/Code/search_tools.py +++ b/Contents/Code/search_tools.py @@ -14,9 +14,9 @@ def __init__(self, lang, manual, media, results): self.media = media self.results = results - def is_year_in_future(self, year): - current_year = (date.today().year) - if year > current_year: + def check_if_preorder(self, book_date): + current_date = (date.today()) + if book_date > current_date: return True def get_id_from_url(self, item):