Limit the try and log what happened for debugging

This commit is contained in:
tcely 2025-02-20 23:24:10 -05:00 committed by GitHub
parent 95774a0d2c
commit 78977bbdec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -601,10 +601,12 @@ def save_all_media_for_source(source_id):
for media in refresh_qs:
try:
media.refresh_formats
except YouTubeError as e:
log.debug(f'Failed to refresh formats for: {source} / {media.key}: {e!s}')
pass
else:
media.save()
already_saved.add(media.uuid)
except YouTubeError:
pass
# Trigger the post_save signal for each media item linked to this source as various
# flags may need to be recalculated