account for removed media having no published data in metadata, resolves #191

This commit is contained in:
meeb 2021-12-10 14:57:50 +11:00
parent aa6df98927
commit 4eca23d88b
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ def download_media_metadata(media_id):
media.skip = True media.skip = True
# If the source has a download cap date check the upload date is allowed # If the source has a download cap date check the upload date is allowed
max_cap_age = source.download_cap_date max_cap_age = source.download_cap_date
if max_cap_age: if media.published and max_cap_age:
if media.published < max_cap_age: if media.published < max_cap_age:
# Media was published after the cap date, skip it # Media was published after the cap date, skip it
log.warn(f'Media: {source} / {media} is older than cap age ' log.warn(f'Media: {source} / {media} is older than cap age '