diff --git a/mopidy/mpd/frontend.py b/mopidy/mpd/frontend.py index 58699a5b..db0e7183 100644 --- a/mopidy/mpd/frontend.py +++ b/mopidy/mpd/frontend.py @@ -642,8 +642,8 @@ class MpdFrontend(object): @handle_pattern(r'^list (?P[Aa]rtist)$') @handle_pattern(r'^list "(?P[Aa]rtist)"$') - @handle_pattern(r'^list (?Palbum)( "(?P[^"]+)")*$') - @handle_pattern(r'^list "(?Palbum)"( "(?P[^"]+)")*$') + @handle_pattern(r'^list (?Palbum( artist)?)( "(?P[^"]+)")*$') + @handle_pattern(r'^list "(?Palbum(" "artist)?)"( "(?P[^"]+)")*$') def _music_db_list(self, field, artist=None): """ *musicpd.org, music database section:* @@ -663,13 +663,21 @@ class MpdFrontend(object): list album artist "an artist name" + returns the albums available for the asked artist:: + + list album artist "Tiesto" + Album: Radio Trance Vol 4-Promo-CD + Album: Ur A Tear in the Open CDR + Album: Simple Trance 2004 Step One + Album: In Concert 05-10-2003 + *ncmpc:* - does not add quotes around the field argument. - capitalizes the field argument. """ field = field.lower() - # TODO + pass # TODO @handle_pattern(r'^listall "(?P[^"]+)"') def _music_db_listall(self, uri): diff --git a/tests/mpd/frontend_test.py b/tests/mpd/frontend_test.py index 932d6d9a..10950ccb 100644 --- a/tests/mpd/frontend_test.py +++ b/tests/mpd/frontend_test.py @@ -1017,6 +1017,10 @@ class MusicDatabaseHandlerTest(unittest.TestCase): def test_list_album_with_artist(self): result = self.h.handle_request(u'list "album" "anartist"') self.assert_(u'OK' in result) + + def test_list_album_artist_with_artist_without_quotes(self): + result = self.h.handle_request(u'list album artist "anartist"') + self.assert_(u'OK' in result) def test_listall(self): result = self.h.handle_request(u'listall "file:///dev/urandom"')