MPD: Add more docs and tests to 'playlistsearch'
This commit is contained in:
parent
999de87d07
commit
c83ac35758
@ -474,6 +474,7 @@ class MpdFrontend(object):
|
||||
return self.backend.current_playlist.mpd_format(start, end)
|
||||
|
||||
@handle_pattern(r'^playlistsearch "(?P<tag>[^"]+)" "(?P<needle>[^"]+)"$')
|
||||
@handle_pattern(r'^playlistsearch (?P<tag>\S+) "(?P<needle>[^"]+)"$')
|
||||
def _current_playlist_playlistsearch(self, tag, needle):
|
||||
"""
|
||||
*musicpd.org, current playlist section:*
|
||||
@ -482,6 +483,11 @@ class MpdFrontend(object):
|
||||
|
||||
Searches case-sensitively for partial matches in the current
|
||||
playlist.
|
||||
|
||||
*GMPC:*
|
||||
|
||||
- does not add quotes around the tag
|
||||
- uses ``filename`` and ``any`` as tags
|
||||
"""
|
||||
raise MpdNotImplemented # TODO
|
||||
|
||||
|
||||
@ -304,7 +304,11 @@ class CurrentPlaylistHandlerTest(unittest.TestCase):
|
||||
self.assert_(u'OK' in result)
|
||||
|
||||
def test_playlistsearch(self):
|
||||
result = self.h.handle_request(u'playlistsearch "tag" "needle"')
|
||||
result = self.h.handle_request(u'playlistsearch "any" "needle"')
|
||||
self.assert_(u'ACK [0@0] {} Not implemented' in result)
|
||||
|
||||
def test_playlistsearch_without_quotes(self):
|
||||
result = self.h.handle_request(u'playlistsearch any "needle"')
|
||||
self.assert_(u'ACK [0@0] {} Not implemented' in result)
|
||||
|
||||
def test_plchanges(self):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user