Try to refresh formats after download failed
This commit is contained in:
1 parent
ad8fa72123
commit
b01af70098
1 file changed
+2
@@ -553,6 +553,8 @@ def download_media(media_id):
|
|||||||
err = (f'Failed to download media: {media} (UUID: {media.pk}) to disk, '
|
err = (f'Failed to download media: {media} (UUID: {media.pk}) to disk, '
|
||||||
f'expected outfile does not exist: {filepath}')
|
f'expected outfile does not exist: {filepath}')
|
||||||
log.error(err)
|
log.error(err)
|
||||||
|
# Try refreshing formats
|
||||||
|
media.refresh_formats
|
||||||
# Raising an error here triggers the task to be re-attempted (or fail)
|
# Raising an error here triggers the task to be re-attempted (or fail)
|
||||||
raise DownloadFailedException(err)
|
raise DownloadFailedException(err)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user