diff --git a/mediagoblin/media_types/video/util.py b/mediagoblin/media_types/video/util.py
index 604702d..1e6c777 100644
|
a
|
b
|
def skip_transcode(metadata, size):
|
| 34 | 34 | |
| 35 | 35 | _log.debug('skip_transcode config: {0}'.format(config)) |
| 36 | 36 | tags = metadata.get_tags() |
| 37 | | if config['mime_types'] and tags.get_string('mimetype'): |
| 38 | | if not tags.get_string('mimetype') in config['mime_types']: |
| | 37 | if config['mime_types'] and tags.get_string('mimetype')[0]: |
| | 38 | if not tags.get_string('mimetype')[1] in config['mime_types']: |
| 39 | 39 | return False |
| 40 | 40 | |
| 41 | | if config['container_formats'] and tags.get_string('container-format'): |
| 42 | | if not (metadata.get_tags().get_string('container-format') in |
| | 41 | if config['container_formats'] and tags.get_string('container-format')[0]: |
| | 42 | if not (tags.get_string('container-format')[1] in |
| 43 | 43 | config['container_formats']): |
| 44 | 44 | return False |
| 45 | 45 | |
| 46 | 46 | if config['video_codecs']: |
| 47 | 47 | for video_info in metadata.get_video_streams(): |
| 48 | | if not (video_info.get_tags().get_string('video-codec') in |
| | 48 | if not (video_info.get_tags().get_string('video-codec')[1] in |
| 49 | 49 | config['video_codecs']): |
| 50 | 50 | return False |
| 51 | 51 | |
| 52 | 52 | if config['audio_codecs']: |
| 53 | 53 | for audio_info in metadata.get_audio_streams(): |
| 54 | | if not (audio_info.get_tags().get_string('audio-codec') in |
| | 54 | if not (audio_info.get_tags().get_string('audio-codec')[1] in |
| 55 | 55 | config['audio_codecs']): |
| 56 | 56 | return False |
| 57 | 57 | |