cc-4227: fix of bad fix regarding normalized data
This commit is contained in:
parent
364f3e777a
commit
37aa879ed0
2 changed files with 4 additions and 13 deletions
|
@ -270,8 +270,10 @@ def organized_path(old_path, root_path, orig_md):
|
|||
ext = extension(old_path)
|
||||
# The blocks for each if statement look awfully similar. Perhaps there is a
|
||||
# way to simplify this code
|
||||
normal_md = default_to_f(orig_md, path_md, unicode_unknown,
|
||||
lambda dictionary, key: len(dictionary[key]) == 0)
|
||||
def default_f(dictionary, key):
|
||||
if key in dictionary: return len(dictionary[key]) == 0
|
||||
else: return True
|
||||
normal_md = default_to_f(orig_md, path_md, unicode_unknown, default_f)
|
||||
if is_airtime_recorded(normal_md):
|
||||
fname = u'%s-%s-%s.%s' % ( normal_md['MDATA_KEY_YEAR'],
|
||||
normal_md['MDATA_KEY_TITLE'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue