Try to refresh formats after download failed

This commit is contained in:
tcely authored and GitHub committed 2025-02-19 17:48:18 -05:00
1 parent ad8fa72123
commit b01af70098
1 file changed
+2
+2
View File
@@ -553,6 +553,8 @@ def download_media(media_id):
err = (f'Failed to download media: {media} (UUID: {media.pk}) to disk, '
f'expected outfile does not exist: {filepath}')
log.error(err)
# Try refreshing formats
media.refresh_formats
# Raising an error here triggers the task to be re-attempted (or fail)
raise DownloadFailedException(err)