From 624cedfce3ad9e28fbd6e59abf21197073dfd008 Mon Sep 17 00:00:00 2001 From: austinsr1 <98631533+austinsr1@users.noreply.github.com> Date: Mon, 23 Sep 2024 09:48:07 -0400 Subject: [PATCH] Update plugin.py Ignoring .files(.unmanic) --- source/notify_radarr/plugin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/notify_radarr/plugin.py b/source/notify_radarr/plugin.py index 42440a2ed..190aba0c4 100644 --- a/source/notify_radarr/plugin.py +++ b/source/notify_radarr/plugin.py @@ -252,17 +252,23 @@ def process_files(settings, source_file, destination_files, host_url, api_key): # Get the basename of the file for dest_file in destination_files: + # Skip hidden files or specific files like .unmanic + if os.path.basename(dest_file).startswith('.'): + logger.info("Ignoring hidden file: '%s'", dest_file) + continue + if mode == 'update_mode': update_mode(api, dest_file, rename_files) elif mode == 'import_mode': minimum_file_size = settings.get_setting('minimum_file_size') if check_file_size_under_max_file_size(dest_file, minimum_file_size): # Ignore this file - logger.info("Ignoring file as it is under configured minimum size file: '%s'", dest_file) + logger.info("Ignoring file as it is under configured minimum size: '%s'", dest_file) continue import_mode(api, source_file, dest_file) + def on_postprocessor_task_results(data): """ Runner function - provides a means for additional postprocessor functions based on the task success.