]> www.vanbest.org Git - motioneye-debian/commitdiff
cameras are now sorted by id when sent to the browser
authorCalin Crisan <ccrisan@gmail.com>
Sat, 9 Nov 2013 11:36:43 +0000 (13:36 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 9 Nov 2013 11:36:43 +0000 (13:36 +0200)
doc/todo.txt
src/handlers.py

index 73afdb53fd384a5b141ff1c2dd8ab80c4c5cb28f..f231b0ad2d003dd7a5fe870cbfb2edcf758eed4f 100644 (file)
@@ -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
index 34f203fb544d2c5f26afd9194d27ea5a9f620025..d8a04e6ece64ad0cc8aab824f878b992c15db468 100644 (file)
@@ -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):