added today as an option for date filters

pull/692/head
meisnate12 3 years ago
parent 6a282708f8
commit f30f338dc6

@ -1 +1 @@
1.15.1-develop38 1.15.1-develop39

@ -1645,6 +1645,9 @@ class CollectionBuilder:
logger.error(error) logger.error(error)
return valid_list return valid_list
elif attribute in plex.date_attributes and modifier in [".before", ".after"]: elif attribute in plex.date_attributes and modifier in [".before", ".after"]:
if data == "today":
return datetime.strftime(datetime.now(), "%Y-%m-%d")
else:
return util.validate_date(data, final, return_as="%Y-%m-%d") return util.validate_date(data, final, return_as="%Y-%m-%d")
elif attribute in plex.year_attributes + ["tmdb_year"] and modifier in ["", ".not"]: elif attribute in plex.year_attributes + ["tmdb_year"] and modifier in ["", ".not"]:
final_years = [] final_years = []

Loading…
Cancel
Save