fix date error

pull/351/head
meisnate12 3 years ago
parent 371cb567e7
commit f7d1992fc2

@ -1468,8 +1468,11 @@ class CollectionBuilder:
if (modifier == "" and (current_data is None or current_data < threshold_date)) \ if (modifier == "" and (current_data is None or current_data < threshold_date)) \
or (modifier == ".not" and current_data and current_data >= threshold_date): or (modifier == ".not" and current_data and current_data >= threshold_date):
return False return False
elif (modifier == ".before" and (current_data is None or current_data >= filter_data)) \ elif modifier in [".before", ".after"]:
or (modifier == ".after" and (current_data is None or current_data <= filter_data)): if current_data is None:
return False
filter_date = datetime.strptime(str(filter_data), "%m/%d/%Y")
if (modifier == ".before" and current_data >= filter_data) or (modifier == ".after" and current_data <= filter_data):
return False return False
elif filter_attr in ["release", "added", "last_played"] and modifier == ".regex": elif filter_attr in ["release", "added", "last_played"] and modifier == ".regex":
jailbreak = False jailbreak = False

Loading…
Cancel
Save