Skip to content

Commit

Permalink
Check entire date and not just year for preorder
Browse files Browse the repository at this point in the history
  • Loading branch information
djdembeck committed Aug 28, 2021
1 parent ee7ef37 commit 7dd4251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Contents/Code/search_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7dd4251

Please sign in to comment.