diff --git a/moonraker/moonraker.py b/moonraker/moonraker.py index c96dda4..9543076 100755 --- a/moonraker/moonraker.py +++ b/moonraker/moonraker.py @@ -468,11 +468,16 @@ class Server: return "ok" async def _handle_info_request(self, web_request): + file_manager = self.lookup_plugin('file_manager', None) + reg_dirs = [] + if file_manager is not None: + reg_dirs = file_manager.get_registered_dirs() return { 'klippy_connected': self.klippy_connection.is_connected(), 'klippy_state': self.klippy_state, 'plugins': list(self.plugins.keys()), - 'failed_plugins': self.failed_plugins} + 'failed_plugins': self.failed_plugins, + 'registered_directories': reg_dirs} class KlippyConnection: def __init__(self, on_recd, on_close): diff --git a/moonraker/plugins/file_manager.py b/moonraker/plugins/file_manager.py index 7eade73..969596e 100644 --- a/moonraker/plugins/file_manager.py +++ b/moonraker/plugins/file_manager.py @@ -117,6 +117,9 @@ class FileManager: def get_sd_directory(self): return self.file_paths.get('gcodes', "") + def get_registered_dirs(self): + return list(self.file_paths.keys()) + def get_fixed_path_args(self): return dict(self.fixed_path_args)