From 76b70aa0c557c63826c1adae5acb10ab94ef3a8c Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 31 Jul 2013 22:49:42 +0200 Subject: [PATCH] mpd: Make 'list' support 'albumartist' key --- mopidy/frontends/mpd/translator.py | 2 +- tests/frontends/mpd/protocol/music_db_test.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mopidy/frontends/mpd/translator.py b/mopidy/frontends/mpd/translator.py index 804f693a..df3338ba 100644 --- a/mopidy/frontends/mpd/translator.py +++ b/mopidy/frontends/mpd/translator.py @@ -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 diff --git a/tests/frontends/mpd/protocol/music_db_test.py b/tests/frontends/mpd/protocol/music_db_test.py index 21c6721f..eaa5da06 100644 --- a/tests/frontends/mpd/protocol/music_db_test.py +++ b/tests/frontends/mpd/protocol/music_db_test.py @@ -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')