From: Christopher Allan Webber Date: Thu, 14 Jul 2016 15:48:28 +0000 (-0500) Subject: Prevent erroring out in some cases of checking video metadata X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=da686c199815137cf9c2b6ce1d1e8c00b82ea680;p=mediagoblin.git Prevent erroring out in some cases of checking video metadata --- diff --git a/mediagoblin/media_types/video/models.py b/mediagoblin/media_types/video/models.py index 4742b342..da635ed7 100644 --- a/mediagoblin/media_types/video/models.py +++ b/mediagoblin/media_types/video/models.py @@ -69,7 +69,7 @@ class VideoData(Base): orig_metadata = self.orig_metadata or {} if ("webm_video" not in self.get_media_entry.media_files - and "mimetype" in orig_metadata['common']['tags'] + and "mimetype" in orig_metadata.get('common', {}).get('tags', {}) and "codec" in orig_metadata['audio'] and "codec" in orig_metadata['video']): if orig_metadata['mimetype'] == 'application/ogg':