cc-1799 Readable Filesystem
check if md dictionary has any md.
This commit is contained in:
parent
f755e41a9a
commit
bb283e195a
|
@ -150,10 +150,11 @@ class MetadataExtractor:
|
||||||
md['MDATA_KEY_MD5'] = md5
|
md['MDATA_KEY_MD5'] = md5
|
||||||
|
|
||||||
file_info = mutagen.File(filepath, easy=True)
|
file_info = mutagen.File(filepath, easy=True)
|
||||||
attrs = self.mutagen2airtime
|
#check if file has any metadata
|
||||||
for key in file_info.keys() :
|
if len(file_info) > 0:
|
||||||
if key in attrs :
|
for key in file_info.keys() :
|
||||||
md[attrs[key]] = file_info[key][0]
|
if key in attrs :
|
||||||
|
md[self.mutagen2airtime[key]] = file_info[key][0]
|
||||||
|
|
||||||
if 'MDATA_KEY_TITLE' not in md:
|
if 'MDATA_KEY_TITLE' not in md:
|
||||||
#get rid of file extention from original name, name might have more than 1 '.' in it.
|
#get rid of file extention from original name, name might have more than 1 '.' in it.
|
||||||
|
|
Loading…
Reference in New Issue