mpd: Make 'list' support 'albumartist' key

This commit is contained in:
Stein Magnus Jodal 2013-07-31 22:49:42 +02:00
parent ccbae310c6
commit 76b70aa0c5
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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')