From ae078b52902051287b8593aa3c5b4943bf38b83d Mon Sep 17 00:00:00 2001 From: tcely Date: Sun, 23 Aug 2026 07:30:09 -0400 Subject: [PATCH] chore: clean up and assign metadata --- tubesync/sync/tasks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tubesync/sync/tasks.py b/tubesync/sync/tasks.py index eea3c92d..8168b780 100644 --- a/tubesync/sync/tasks.py +++ b/tubesync/sync/tasks.py @@ -508,6 +508,8 @@ def migrate_to_metadata(media_id): if existing_value and ('epoch' == key or value == existing_value): continue media.save_to_metadata(field, value) + # clean up the record created during indexing + data.delete() migrating_lock.acquired = False @@ -733,6 +735,10 @@ def download_source_images(source_id): f'source exists with ID: {source_id}') raise CancelExecution(_('no such source'), retry=False) from e avatar, banner, thumbnail = source.get_image_url + Metadata.objects.filter( + value__original_url=source.url, + media__isnull=True, source__isnull=True, + ).update(source=source) log.info(f'Thumbnail URL for source with ID: {source_id} / {source} ' f'Avatar: {avatar} ' f'Banner: {banner} '