mpd: Make 'list' support 'albumartist' key
This commit is contained in:
parent
ccbae310c6
commit
76b70aa0c5
@ -166,7 +166,7 @@ def query_from_mpd_list_format(field, mpd_query):
|
||||
key = tokens[0].lower()
|
||||
value = tokens[1]
|
||||
tokens = tokens[2:]
|
||||
if key not in ('artist', 'album', 'date', 'genre'):
|
||||
if key not in ('artist', 'album', 'albumartist', 'date', 'genre'):
|
||||
raise MpdArgError('not able to parse args', command='list')
|
||||
if not value:
|
||||
raise ValueError
|
||||
|
||||
@ -366,6 +366,10 @@ class MusicDatabaseListTest(protocol.BaseTestCase):
|
||||
self.sendRequest('list "album" "album" "analbum"')
|
||||
self.assertInResponse('OK')
|
||||
|
||||
def test_list_album_by_albumartist(self):
|
||||
self.sendRequest('list "album" "albumartist" "anartist"')
|
||||
self.assertInResponse('OK')
|
||||
|
||||
def test_list_album_by_full_date(self):
|
||||
self.sendRequest('list "album" "date" "2001-01-01"')
|
||||
self.assertInResponse('OK')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user