diff --git a/scan_to_paperless/status.py b/scan_to_paperless/status.py index e71902db8..67fa2ec65 100644 --- a/scan_to_paperless/status.py +++ b/scan_to_paperless/status.py @@ -80,6 +80,23 @@ def scan(self) -> None: if name not in self._status: self._update_status(name, force=True) + for folder in glob.glob(os.path.join(os.environ.get("SCAN_SOURCE_FOLDER", "/source"), "*")): + name = os.path.basename(folder) + + if name not in self._status: + names.append(name) + + self._update_status( + name, + "Missing config", + ", ".join( + glob.glob( + os.path.join(os.environ.get("SCAN_SOURCE_FOLDER", "/source"), folder, "**"), + recursive=True, + ) + ), + ) + for name in self._status: # pylint: disable=consider-using-dict-items if name not in names: del self._status[name]