fix: use configured directory for image scan instead of always auto-detecting

_find_comfyui_output_dir() now checks GalleryConfig.MONITORING_DIRECTORIES
first before falling back to filesystem auto-detection. Also invalidates
the cached directory when the user changes the setting via save_settings().

Closes #108
This commit is contained in:
Vito Sansevero
2026-02-09 04:52:03 -08:00
parent 0a2c274a27
commit 6a5834e243
3 changed files with 145 additions and 2 deletions
+2
View File
@@ -448,6 +448,8 @@ class AdminRoutesMixin:
GalleryConfig.MONITORING_DIRECTORIES = [new_path]
else:
GalleryConfig.MONITORING_DIRECTORIES = []
# Invalidate cached output dir so next lookup uses new config
self._cached_output_dir = None
restart_required = True
# Save to config file for persistence