]> www.vanbest.org Git - motioneye-debian/commitdiff
repetitive tasks scheduled at startup are now deferred
authorCalin Crisan <ccrisan@gmail.com>
Sat, 16 Nov 2013 19:07:07 +0000 (21:07 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 16 Nov 2013 19:07:07 +0000 (21:07 +0200)
motioneye.py
static/css/main.css
static/js/main.js

index fff516ce173de204a94eea8ba3309362018201f7..09e11c64c2c36b0c2ed6fcf66e283c28715442be 100755 (executable)
@@ -180,8 +180,9 @@ def _start_motion():
 def _start_cleanup():
     import mediafiles
 
+    ioloop = tornado.ioloop.IOLoop.instance()
+    
     def do_cleanup():
-        ioloop = tornado.ioloop.IOLoop.instance()
         if ioloop._stopped:
             return
         
@@ -195,14 +196,15 @@ def _start_cleanup():
 
         ioloop.add_timeout(datetime.timedelta(seconds=settings.CLEANUP_INTERVAL), do_cleanup)
 
-    do_cleanup()
+    ioloop.add_timeout(datetime.timedelta(seconds=settings.CLEANUP_INTERVAL), do_cleanup)
 
 
 def _start_movie_thumbnailer():
     import mediafiles
 
+    ioloop = tornado.ioloop.IOLoop.instance()
+    
     def do_next_movie_thumbail():
-        ioloop = tornado.ioloop.IOLoop.instance()
         if ioloop._stopped:
             return
         
@@ -214,8 +216,8 @@ def _start_movie_thumbnailer():
                     'msg': unicode(e)})
 
         ioloop.add_timeout(datetime.timedelta(seconds=settings.MJPG_CLIENT_TIMEOUT), do_next_movie_thumbail)
-
-    do_next_movie_thumbail()
+    
+    ioloop.add_timeout(datetime.timedelta(seconds=settings.MJPG_CLIENT_TIMEOUT), do_next_movie_thumbail)
 
 
 if __name__ == '__main__':
index 5b6fde4262d21010c580d36fb7d99b81a07553b8..e97d29fdb75af1b7d65c4f2893b165ef648d529e 100644 (file)
@@ -347,6 +347,10 @@ tr.rpi {
 
 
     /* dialogs */
+    
+table.add-camera-dialog {
+    margin: auto;
+}
 
 table.add-camera-dialog select,
 table.add-camera-dialog input[type=text],
@@ -360,6 +364,8 @@ div.media-dialog {
 
 div.media-dialog-groups {
     text-align: center;
+    overflow: auto;
+    white-space: nowrap;
 }
 
 div.media-dialog-group-button {
index 4088ae6ec029b3a247f624524c8b8e6d1021f1bb..c47dcd4955e0ea2301f8356f4d31d56cb5f54113 100644 (file)
@@ -852,7 +852,7 @@ function doUpdate() {
                             runAlertDialog('motionEye was successfully updated!', function () {
                                 window.location.reload(true);
                             });
-                        }, 2000);
+                        }, 10000);
                     }
                     else {
                         runAlertDialog('Update failed!', function () {
@@ -1350,6 +1350,11 @@ function runMediaDialog(cameraId, mediaType) {
             var parts = path.split('/');
             var keyParts = parts.splice(0, parts.length - 1);
             var key = keyParts.join('/');
+            
+            if (key.indexOf('/') === 0) {
+                key = key.substring(1);
+            }
+            
             var list = (groups[key] = groups[key] || []);
             
             list.push({
@@ -1421,9 +1426,6 @@ function runMediaDialog(cameraId, mediaType) {
             
             mediaListDiv.html('');
 
-//            var groupDiv = $('<div class="media-list-group-title">' + (key || '(ungrouped)') + '</div>');
-//            dialogDiv.append(groupDiv);
-            
             var entries = groups[key];
             entries.forEach(function (entry) {
                 mediaListDiv.append(entry.div);