mpd: Fix 'title' to 'track' and back conversion in list cmd
This commit is contained in:
parent
5cc019afa2
commit
0d032a25fa
@ -33,7 +33,7 @@ _LIST_MAPPING = {
|
||||
'performer': 'performer'}
|
||||
|
||||
_LIST_NAME_MAPPING = {
|
||||
'title': 'Title',
|
||||
'track': 'Title',
|
||||
'album': 'Album',
|
||||
'albumartist': 'AlbumArtist',
|
||||
'artist': 'Artist',
|
||||
@ -267,9 +267,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')
|
||||
|
||||
query = None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user