From 12071aa4cea20b93e00ed61f7a8ea3edde382041 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 9 Nov 2013 13:36:43 +0200 Subject: [PATCH] cameras are now sorted by id when sent to the browser --- doc/todo.txt | 1 - src/handlers.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/todo.txt b/doc/todo.txt index 73afdb5..f231b0a 100644 --- a/doc/todo.txt +++ b/doc/todo.txt @@ -1,4 +1,3 @@ --> order of the cams is a bit random -> disk usage at bottom -> make camera frames positions configurable -> add a view log functionality diff --git a/src/handlers.py b/src/handlers.py index 34f203f..d8a04e6 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -376,6 +376,7 @@ class ConfigHandler(BaseHandler): length = [len(camera_ids)] def check_finished(): if len(cameras) == length[0]: + cameras.sort(key=lambda c: c['id']) self.finish_json({'cameras': cameras}) def on_response_builder(camera_id, camera_config): -- 2.39.5