mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 14:06:36 +00:00
commit
76bac6e48e
@ -1,9 +1,11 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
from common.logger import log
|
||||
from common.errors import (
|
||||
NoMetadataException,
|
||||
)
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from ..choices import Val, SourceResolution
|
||||
|
||||
|
||||
@ -47,6 +49,7 @@ def download_checklist(self, skip_checks=False):
|
||||
f'the source has a download cap and the media is now too old, '
|
||||
f'not downloading')
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def download_finished(self, format_str, container, downloaded_filepath=None):
|
||||
|
@ -635,6 +635,8 @@ def download_media(media_id, override=False):
|
||||
raise InvalidTaskError(_('no such media')) from e
|
||||
else:
|
||||
if not media.download_checklist(override):
|
||||
# any condition that needs to reschedule the task
|
||||
# should raise an exception to avoid this
|
||||
return
|
||||
|
||||
filepath = media.filepath
|
||||
|
Loading…
Reference in New Issue
Block a user