Track result should contain key
This commit is contained in:
parent
74d004d6fe
commit
dd25fadd8b
@ -141,6 +141,7 @@ def _add_to_tag_cache(result, folders, files):
|
||||
path = uri_to_path(track_result['file'])
|
||||
track_result['mtime'] = get_mtime(path)
|
||||
track_result['file'] = re.sub(regexp, '', path)
|
||||
track_result['key'] = os.path.basename(track_result['file'])
|
||||
track_result = order_mpd_track_info(track_result.items())
|
||||
result.extend(track_result)
|
||||
result.append(('songList end',))
|
||||
|
||||
@ -101,6 +101,7 @@ class TracksToTagCacheFormatTest(unittest.TestCase):
|
||||
result = dict(translator.track_to_mpd_format(track))
|
||||
result['file'] = uri_to_path(result['file'])
|
||||
result['file'] = result['file'][len(folder)+1:]
|
||||
result['key'] = os.path.basename(result['file'])
|
||||
result['mtime'] = mtime('')
|
||||
return translator.order_mpd_track_info(result.items())
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user