add check that media items have a published date from metadata set before checking for download caps when filtering, resolves #519 (related to #515)

pull/306/merge
meeb 2024-07-18 01:42:36 +10:00
parent 69a824e334
commit 68de807483
1 changed files with 9 additions and 0 deletions

View File

@ -100,6 +100,15 @@ def filter_filter_text(instance: Media):
def filter_max_cap(instance: Media):
if instance.published is None:
log.debug(
f"Media: {instance.source} / {instance} has no published date "
f"set (likely not downloaded metadata) so not filtering based on "
f"publish date"
)
return False
max_cap_age = instance.source.download_cap_date
if not max_cap_age:
log.debug(