Support list album artist "someartist"
This commit is contained in:
parent
7922795d2f
commit
699385b613
@ -642,8 +642,8 @@ class MpdFrontend(object):
|
||||
|
||||
@handle_pattern(r'^list (?P<field>[Aa]rtist)$')
|
||||
@handle_pattern(r'^list "(?P<field>[Aa]rtist)"$')
|
||||
@handle_pattern(r'^list (?P<field>album)( "(?P<artist>[^"]+)")*$')
|
||||
@handle_pattern(r'^list "(?P<field>album)"( "(?P<artist>[^"]+)")*$')
|
||||
@handle_pattern(r'^list (?P<field>album( artist)?)( "(?P<artist>[^"]+)")*$')
|
||||
@handle_pattern(r'^list "(?P<field>album(" "artist)?)"( "(?P<artist>[^"]+)")*$')
|
||||
def _music_db_list(self, field, artist=None):
|
||||
"""
|
||||
*musicpd.org, music database section:*
|
||||
@ -669,7 +669,7 @@ class MpdFrontend(object):
|
||||
- capitalizes the field argument.
|
||||
"""
|
||||
field = field.lower()
|
||||
# TODO
|
||||
pass # TODO
|
||||
|
||||
@handle_pattern(r'^listall "(?P<uri>[^"]+)"')
|
||||
def _music_db_listall(self, uri):
|
||||
|
||||
@ -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"')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user