fix crash on audio-less files

This commit is contained in:
Martinez 2018-10-11 00:00:31 +02:00
parent 4f9cac78c5
commit ddb5f38d75
2 changed files with 3 additions and 1 deletions

View file

@ -198,6 +198,8 @@ if __name__ == "__main__":
info.audio_samplerate = over.text.Unit(audio["sample_rate"], "Hz")
info.audio_language = audio["tags"]["language"] if "tags" in audio and "language" in audio["tags"] else "und"
info.audio_bitrate = over.text.Unit(audio["bit_rate"], "b/s") if "bit_rate" in audio else "<R>??<.>"
else:
info.audio_channel_layout = None
except:
main.print("exception while reading identify_dict, dump follows", main.print.tl.fail)