Skip to content

Commit

Permalink
add check that media items have a published date from metadata set be…
Browse files Browse the repository at this point in the history
…fore checking for download caps when filtering, resolves #519 (related to #515)
  • Loading branch information
meeb committed Jul 17, 2024
1 parent 69a824e commit 68de807
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tubesync/sync/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 68de807

Please sign in to comment.