From: Dermot Duffy Date: Wed, 19 Oct 2016 04:15:56 +0000 (+0100) Subject: Merge branch 'master' of https://github.com/ccrisan/motioneye into movie-playback X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=27265a81e70a840ab20e07b1f0bffc3b0b8cf9c2;p=motioneye-debian Merge branch 'master' of https://github.com/ccrisan/motioneye into movie-playback --- 27265a81e70a840ab20e07b1f0bffc3b0b8cf9c2 diff --cc motioneye/handlers.py index f36f745,18739aa..d4cb1fd --- a/motioneye/handlers.py +++ b/motioneye/handlers.py @@@ -1339,16 -1427,16 +1428,15 @@@ class MovieHandler(BaseHandler) '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.' % { diff --cc motioneye/static/js/main.js index 7944496,b978106..16c68ab --- a/motioneye/static/js/main.js +++ b/motioneye/static/js/main.js @@@ -3009,14 -3360,13 +3412,14 @@@ function runPictureDialog(entries, pos } 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(); }