From c4d8928029a52bee765c6bdb3fd17b642642cebb Mon Sep 17 00:00:00 2001 From: tcely Date: Sun, 15 Jun 2025 14:29:01 -0400 Subject: [PATCH] Update signals.py --- tubesync/sync/signals.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tubesync/sync/signals.py b/tubesync/sync/signals.py index 998ab3a3..07577aeb 100644 --- a/tubesync/sync/signals.py +++ b/tubesync/sync/signals.py @@ -34,7 +34,7 @@ def source_pre_save(sender, instance, **kwargs): return args = ( str(instance.pk), ) - check_source_directory_exists.now(*args) + check_source_directory_exists.call_local(*args) existing_dirpath = existing_source.directory_path.resolve(strict=True) new_dirpath = instance.directory_path.resolve(strict=False) if existing_dirpath != new_dirpath: @@ -105,11 +105,7 @@ def source_pre_save(sender, instance, **kwargs): def source_post_save(sender, instance, created, **kwargs): # Check directory exists and create an indexing task for newly created sources if created: - verbose_name = _('Check download directory exists for source "{}"') - check_source_directory_exists( - str(instance.pk), - verbose_name=verbose_name.format(instance.name), - ) + check_source_directory_exists(str(instance.pk)) if instance.source_type != Val(YouTube_SourceType.PLAYLIST) and instance.copy_channel_images: download_source_images(str(instance.pk)) if instance.index_schedule > 0: @@ -139,7 +135,6 @@ def source_pre_delete(sender, instance, **kwargs): instance.deactivate() log.info(f'Deleting tasks for source: {instance.name}') delete_task_by_source('sync.tasks.index_source_task', instance.pk) - delete_task_by_source('sync.tasks.check_source_directory_exists', instance.pk) delete_task_by_source('sync.tasks.rename_all_media_for_source', instance.pk) delete_task_by_source('sync.tasks.save_all_media_for_source', instance.pk) @@ -166,7 +161,6 @@ def source_post_delete(sender, instance, **kwargs): source = instance log.info(f'Deleting tasks for removed source: {source.name}') delete_task_by_source('sync.tasks.index_source_task', instance.pk) - delete_task_by_source('sync.tasks.check_source_directory_exists', instance.pk) delete_task_by_source('sync.tasks.rename_all_media_for_source', instance.pk) delete_task_by_source('sync.tasks.save_all_media_for_source', instance.pk)