Reduce how often we filter the media, it happens at save time

pull/515/head
Tim 2024-07-13 08:25:16 +08:00
parent 4749193edd
commit 575a6f0c6c
1 changed files with 1 additions and 8 deletions

View File

@ -302,14 +302,7 @@ def download_media_metadata(media_id):
if media.metadata_duration: if media.metadata_duration:
media.duration = media.metadata_duration media.duration = media.metadata_duration
filter_media(media) # Don't filter media here, the post_save signal will handle that
# 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
media.save() media.save()
log.info(f'Saved {len(media.metadata)} bytes of metadata for: ' log.info(f'Saved {len(media.metadata)} bytes of metadata for: '
f'{source} / {media_id}') f'{source} / {media_id}')