From: Calin Crisan Date: Sat, 9 Nov 2013 11:36:43 +0000 (+0200) Subject: cameras are now sorted by id when sent to the browser X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=12071aa4cea20b93e00ed61f7a8ea3edde382041;p=motioneye-debian cameras are now sorted by id when sent to the browser --- 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):