From 7d726b3d29ed8cc71e13e23752b4104dca468101 Mon Sep 17 00:00:00 2001 From: Audionut Date: Sat, 28 Dec 2024 12:03:45 +1000 Subject: [PATCH] fix nfo from path --- src/prep.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/prep.py b/src/prep.py index 047de515..5cc8d2ce 100644 --- a/src/prep.py +++ b/src/prep.py @@ -1379,19 +1379,18 @@ def clean_text(text): base_dir = meta['base_dir'] uuid = meta['uuid'] - current_dir_path = "*.nfo" + path = meta['path'] specified_dir_path = os.path.join(base_dir, "tmp", uuid, "*.nfo") + source_dir_path = os.path.join(path, "*.nfo") if meta['debug']: console.print(f"specified_dir_path: {specified_dir_path}") + console.print(f"sourcedir_path: {source_dir_path}") if meta.get('nfo') and not content_written: if 'auto_nfo' in meta and meta['auto_nfo'] is True: nfo_files = glob.glob(specified_dir_path) scene_nfo = True else: - nfo_files = glob.glob(current_dir_path) - if meta['debug']: - console.print(f"Glob current_dir_path matches: {glob.glob(current_dir_path)}") - console.print(f"Glob specified_dir_path matches: {glob.glob(specified_dir_path)}") + nfo_files = glob.glob(source_dir_path) if not nfo_files: console.print("NFO was set but no nfo file was found") description.write("\n")