Skip to content

Commit

Permalink
Reduce how often we filter the media, it happens at save time
Browse files Browse the repository at this point in the history
  • Loading branch information
timwhite committed Jul 13, 2024
1 parent 4749193 commit 575a6f0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions tubesync/sync/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand Down

0 comments on commit 575a6f0

Please sign in to comment.