mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 21:46:44 +00:00
Download metadata before indexing another source
This commit is contained in:
parent
8cf2827e69
commit
af0e300ef1
@ -234,6 +234,13 @@ def index_source_task(source_id):
|
|||||||
)
|
)
|
||||||
if new_media_instance:
|
if new_media_instance:
|
||||||
log.info(f'Indexed new media: {source} / {media}')
|
log.info(f'Indexed new media: {source} / {media}')
|
||||||
|
log.info(f'Scheduling task to download metadata for: {media.url}')
|
||||||
|
verbose_name = _('Downloading metadata for "{}"')
|
||||||
|
download_media_metadata(
|
||||||
|
str(media.pk),
|
||||||
|
priority=9,
|
||||||
|
verbose_name=verbose_name.format(media.pk),
|
||||||
|
)
|
||||||
except IntegrityError as e:
|
except IntegrityError as e:
|
||||||
log.error(f'Index media failed: {source} / {media} with "{e}"')
|
log.error(f'Index media failed: {source} / {media} with "{e}"')
|
||||||
# Tack on a cleanup of old completed tasks
|
# Tack on a cleanup of old completed tasks
|
||||||
|
Loading…
Reference in New Issue
Block a user