added today as an option for date filters

This commit is contained in:
meisnate12 2022-02-02 23:22:47 -05:00
parent 6a282708f8
commit f30f338dc6
2 changed files with 5 additions and 2 deletions

View file

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

View file

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