diff --git a/pandora/archive/extract.py b/pandora/archive/extract.py index 0b27ad02b..f038d474a 100644 --- a/pandora/archive/extract.py +++ b/pandora/archive/extract.py @@ -352,7 +352,8 @@ def stream(video, target, profile, info, audio_track=0, flags={}): shutil.move(enc_target, target) for f in glob('%s.log*' % target): os.unlink(f) - make_keyframe_index(target) + if info['video']: + make_keyframe_index(target) return True, None diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 68ef30abb..306590b20 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -370,7 +370,8 @@ class File(models.Model): self.info.update(stream.info) self.parse_info() self.save() - extract.make_keyframe_index(stream.media.path) + if stream.info.get('video'): + extract.make_keyframe_index(stream.media.path) return True, stream.media.size return save_chunk(stream, stream.media, chunk, offset, name, done_cb) return False, 0