Return empty metadata instead of empty dictionary

This commit is contained in:
Sambhav Kothari
2017-01-12 17:39:19 +05:30
parent 198f874001
commit e42944e8f4

View File

@@ -117,6 +117,7 @@ class MP4File(File):
if tags is None:
file.add_tags()
metadata = Metadata()
if not tags:
# MPEG-4 file in an mov container is unsupported and is one of
# the formats which returns a positive score in guess_format method
@@ -124,8 +125,8 @@ class MP4File(File):
# remove it and log an error
log.error("Unable to load tags for file {}".format(self))
self.remove()
return {}
metadata = Metadata()
return metadata
for name, values in tags.items():
if name in self.__text_tags:
for value in values: