'filename': filename, 'id': camera_id})
camera_config = config.get_camera(camera_id)
- if utils.local_motion_camera(camera_config):
+ if utils.is_local_motion_camera(camera_config):
content = mediafiles.get_media_content(camera_config, filename, 'movie')
-
+
pretty_filename = camera_config['@name'] + '_' + os.path.basename(filename)
- self.set_header('Content-Type', 'video/mpeg')
+ self.set_header('Content-Type', mimetypes.guess_type(filename)[0] or 'video/mpeg')
self.set_header('Content-Disposition', 'attachment; filename=' + pretty_filename + ';')
-
+
self.finish(content)
-
- elif utils.remote_camera(camera_config):
-
+ elif utils.is_remote_camera(camera_config):
def on_response(response=None, error=None):
if error:
return self.finish_json({'error': 'Failed to download movie from %(url)s: %(msg)s.' % {
}
else {
img.height(height);
+ video_container.height(height);
}
updateModalDialogPosition();
- prevArrow.css('display', pos > 0 ? '' : 'none');
- nextArrow.css('display', pos < entries.length - 1 ? '' : 'none');
+ prevArrow.css('display', pos < entries.length - 1 ? '' : 'none');
+ nextArrow.css('display', pos > 0 ? '' : 'none');
progressImg.remove();
});
-
+
$('div.modal-container').find('span.modal-title:last').html(entry.name);
updateModalDialogPosition();
}