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'}
|
'performer': 'performer'}
|
||||||
|
|
||||||
_LIST_NAME_MAPPING = {
|
_LIST_NAME_MAPPING = {
|
||||||
'title': 'Title',
|
'track': 'Title',
|
||||||
'album': 'Album',
|
'album': 'Album',
|
||||||
'albumartist': 'AlbumArtist',
|
'albumartist': 'AlbumArtist',
|
||||||
'artist': 'Artist',
|
'artist': 'Artist',
|
||||||
@ -267,9 +267,10 @@ def list_(context, *args):
|
|||||||
params = list(args)
|
params = list(args)
|
||||||
if not params:
|
if not params:
|
||||||
raise exceptions.MpdArgError('incorrect arguments')
|
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')
|
raise exceptions.MpdArgError('incorrect arguments')
|
||||||
|
|
||||||
query = None
|
query = None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user