CC-5820: Airtime Analyzer: Length and MIME parsing skipped if file has

no audio metadata tags.
This commit is contained in:
Albert Santoni 2014-04-28 11:54:59 -04:00
parent d081ff10b2
commit 375ec54778

View file

@ -29,8 +29,10 @@ class MetadataAnalyzer(Analyzer):
#Bail if the file couldn't be parsed. The title should stay as the filename
#inside Airtime.
if not audio_file:
if audio_file == None: # Don't use "if not" here. It is wrong due to mutagen's design.
return metadata
# Note that audio_file can equal {} if the file is valid but there's no metadata tags.
# We can still try to grab the info variables below.
#Grab other file information that isn't encoded in a tag, but instead usually
#in the file header. Mutagen breaks that out into a separate "info" object: