Merge branch 'cc-5709-airtime-analyzer' of github.com:sourcefabric/Airtime into cc-5709-airtime-analyzer

This commit is contained in:
drigato 2014-04-28 14:45:05 -04:00
commit f9f9e2458e
1 changed files with 3 additions and 1 deletions

View File

@ -29,8 +29,10 @@ class MetadataAnalyzer(Analyzer):
#Bail if the file couldn't be parsed. The title should stay as the filename #Bail if the file couldn't be parsed. The title should stay as the filename
#inside Airtime. #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 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 #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: #in the file header. Mutagen breaks that out into a separate "info" object: