diff --git a/tubesync/sync/tasks.py b/tubesync/sync/tasks.py index 7e7a0f0f..b15e4c71 100644 --- a/tubesync/sync/tasks.py +++ b/tubesync/sync/tasks.py @@ -422,6 +422,8 @@ def download_media_thumbnail(media_id, url): except Media.DoesNotExist: # Task triggered but the media no longer exists, do nothing return + if not media.has_metadata: + raise DownloadFailedException('Metadata is not yet available.') if media.skip: # Media was toggled to be skipped after the task was scheduled log.warn(f'Download task triggered for media: {media} (UUID: {media.pk}) but ' @@ -459,6 +461,8 @@ def download_media(media_id): except Media.DoesNotExist: # Task triggered but the media no longer exists, do nothing return + if not media.has_metadata: + raise DownloadFailedException('Metadata is not yet available.') if media.skip: # Media was toggled to be skipped after the task was scheduled log.warn(f'Download task triggered for media: {media} (UUID: {media.pk}) but '