MPD: Support 'plchanges' without quotes to work with BitMPC
This commit is contained in:
parent
a3fb8a1f72
commit
5393407571
@ -25,6 +25,7 @@ Another great release.
|
|||||||
- Fixed ``play "-1"`` and ``playid "-1"`` behaviour when playlist is empty.
|
- Fixed ``play "-1"`` and ``playid "-1"`` behaviour when playlist is empty.
|
||||||
- Support ``plchanges "-1"`` to work better with MPDroid.
|
- Support ``plchanges "-1"`` to work better with MPDroid.
|
||||||
- Support ``pause`` without arguments to work better with MPDroid.
|
- Support ``pause`` without arguments to work better with MPDroid.
|
||||||
|
- Support ``plchanges`` without quotes to work better with BitMPC.
|
||||||
|
|
||||||
- Backend API:
|
- Backend API:
|
||||||
|
|
||||||
|
|||||||
@ -257,6 +257,7 @@ def playlistsearch(frontend, tag, needle):
|
|||||||
"""
|
"""
|
||||||
raise MpdNotImplemented # TODO
|
raise MpdNotImplemented # TODO
|
||||||
|
|
||||||
|
@handle_pattern(r'^plchanges (?P<version>-?\d+)$')
|
||||||
@handle_pattern(r'^plchanges "(?P<version>-?\d+)"$')
|
@handle_pattern(r'^plchanges "(?P<version>-?\d+)"$')
|
||||||
def plchanges(frontend, version):
|
def plchanges(frontend, version):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -330,6 +330,15 @@ class CurrentPlaylistHandlerTest(unittest.TestCase):
|
|||||||
self.assert_(u'Title: c' in result)
|
self.assert_(u'Title: c' in result)
|
||||||
self.assert_(u'OK' in result)
|
self.assert_(u'OK' in result)
|
||||||
|
|
||||||
|
def test_plchanges_without_quotes_works(self):
|
||||||
|
self.b.current_playlist.load(
|
||||||
|
[Track(name='a'), Track(name='b'), Track(name='c')])
|
||||||
|
result = self.h.handle_request(u'plchanges 0')
|
||||||
|
self.assert_(u'Title: a' in result)
|
||||||
|
self.assert_(u'Title: b' in result)
|
||||||
|
self.assert_(u'Title: c' in result)
|
||||||
|
self.assert_(u'OK' in result)
|
||||||
|
|
||||||
def test_plchangesposid(self):
|
def test_plchangesposid(self):
|
||||||
self.b.current_playlist.load([Track(), Track(), Track()])
|
self.b.current_playlist.load([Track(), Track(), Track()])
|
||||||
result = self.h.handle_request(u'plchangesposid "0"')
|
result = self.h.handle_request(u'plchangesposid "0"')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user