mpd: Fix 'title' to 'track' and back conversion in list cmd

(cherry picked from commit 0d032a25fa)
This commit is contained in:
Stein Magnus Jodal 2015-06-25 23:16:45 +02:00
parent 167184d8e5
commit c4e930a17b

View File

@ -32,7 +32,7 @@ _LIST_MAPPING = {
'performer': 'performer'}
_LIST_NAME_MAPPING = {
'title': 'Title',
'track': 'Title',
'album': 'Album',
'albumartist': 'AlbumArtist',
'artist': 'Artist',
@ -260,9 +260,10 @@ def list_(context, *args):
params = list(args)
if not params:
raise exceptions.MpdArgError('incorrect arguments')
field = params.pop(0).lower()
if field not in _LIST_MAPPING:
field = params.pop(0).lower()
field = _LIST_MAPPING.get(field)
if field is None:
raise exceptions.MpdArgError('incorrect arguments')
if len(params) == 1: