from PIL import Image
import config
-import utils
_PICTURE_EXTS = ['.jpg']
framerate = camera_config['framerate']
pre_capture = camera_config['pre_capture']
offs = pre_capture / framerate
- offs *= 2
+ offs = min(4, offs * 2)
+
cmd = 'ffmpeg -i "%(path)s" -f mjpeg -vframes 1 -ss %(offs)s -y %(path)s.thumb' % {
'path': full_path, 'offs': offs}
/* prepare the entries within each group */
keys.forEach(function (key) {
var entries = groups[key];
- entries.sortKey(function (e) {return e.timestamp;});
+ entries.sortKey(function (e) {return e.timestamp || e.name;});
entries.forEach(function (entry, pos) {
var entryDiv = $('<div class="media-list-entry"></div>');