From 4eca23d88b93f645b17b80a1787f8772cb10047a Mon Sep 17 00:00:00 2001 From: meeb Date: Fri, 10 Dec 2021 14:57:50 +1100 Subject: [PATCH] account for removed media having no published data in metadata, resolves #191 --- tubesync/sync/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubesync/sync/tasks.py b/tubesync/sync/tasks.py index 9cca708..f0a10a6 100644 --- a/tubesync/sync/tasks.py +++ b/tubesync/sync/tasks.py @@ -235,7 +235,7 @@ def download_media_metadata(media_id): media.skip = True # If the source has a download cap date check the upload date is allowed max_cap_age = source.download_cap_date - if max_cap_age: + if media.published and max_cap_age: if media.published < max_cap_age: # Media was published after the cap date, skip it log.warn(f'Media: {source} / {media} is older than cap age '