From 575a6f0c6c84142943a440ee338bd0a475dbdaed Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 13 Jul 2024 08:25:16 +0800 Subject: [PATCH] Reduce how often we filter the media, it happens at save time --- tubesync/sync/tasks.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tubesync/sync/tasks.py b/tubesync/sync/tasks.py index 8031467..305c0b8 100644 --- a/tubesync/sync/tasks.py +++ b/tubesync/sync/tasks.py @@ -302,14 +302,7 @@ def download_media_metadata(media_id): if media.metadata_duration: media.duration = media.metadata_duration - filter_media(media) - # Check we can download the media item - if not media.skip: - if media.get_format_str(): - media.can_download = True - else: - media.can_download = False - # Save the media + # Don't filter media here, the post_save signal will handle that media.save() log.info(f'Saved {len(media.metadata)} bytes of metadata for: ' f'{source} / {media_id}')