Use the refesh_formats task instead of the function

This commit is contained in:
tcely authored and GitHub committed 2025-04-09 03:28:53 -04:00
1 parent 3b0ecf29be
commit 5b53621360
1 file changed
+4 -1
+4 -1
View File
@@ -634,7 +634,10 @@ def download_media(media_id):
log.error(err)
# Try refreshing formats
if media.has_metadata:
media.refresh_formats
refesh_formats(
str(media.pk),
verbose_name=f'Refreshing metadata formats for: {media.key}: "{media.name}"',
)
# Raising an error here triggers the task to be re-attempted (or fail)
raise DownloadFailedException(err)