file_manager: implement file_list_changed notifcation
This notification is moved from moonraker.py. Instead of sending a filelist, it now updates the file list and sends all relevant information to the client. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
@@ -336,16 +336,6 @@ class Server:
|
||||
ServerError("Klippy Host not connected", 503))
|
||||
return base_request
|
||||
|
||||
def notify_filelist_changed(self, filename, action):
|
||||
file_manager = self.lookup_plugin('file_manager')
|
||||
try:
|
||||
filelist = file_manager.get_file_list(format_list=True)
|
||||
except ServerError:
|
||||
filelist = []
|
||||
result = {'filename': filename, 'action': action,
|
||||
'filelist': filelist}
|
||||
self.send_event("server:filelist_changed", result)
|
||||
|
||||
async def _kill_server(self):
|
||||
# XXX - Currently this function is not used.
|
||||
# Should I expose functionality to shutdown
|
||||
|
Reference in New Issue
Block a user