MPD: Handle 'lsinfo ""' in the same way as 'lsinfo' and 'lsinfo "/"'
This commit is contained in:
parent
5449374fa2
commit
b408751520
@ -679,8 +679,12 @@ class MpdFrontend(object):
|
||||
When listing the root directory, this currently returns the list of
|
||||
stored playlists. This behavior is deprecated; use
|
||||
``listplaylists`` instead.
|
||||
|
||||
MPD returns the same result, including both playlists and the files and
|
||||
directories located at the root level, for both ``lsinfo``, ``lsinfo
|
||||
""``, and ``lsinfo "/"``.
|
||||
"""
|
||||
if uri == u'/' or uri is None:
|
||||
if uri is None or uri == u'/' or uri == u'':
|
||||
return self._stored_playlists_listplaylists()
|
||||
raise MpdNotImplemented # TODO
|
||||
|
||||
|
||||
@ -964,9 +964,10 @@ class MusicDatabaseHandlerTest(unittest.TestCase):
|
||||
listplaylists_result = self.h.handle_request(u'listplaylists')
|
||||
self.assertEqual(lsinfo_result, listplaylists_result)
|
||||
|
||||
def test_lsinfo_with_path(self):
|
||||
result = self.h.handle_request(u'lsinfo ""')
|
||||
self.assert_(u'ACK Not implemented' in result)
|
||||
def test_lsinfo_with_empty_path_returns_same_as_listplaylists(self):
|
||||
lsinfo_result = self.h.handle_request(u'lsinfo ""')
|
||||
listplaylists_result = self.h.handle_request(u'listplaylists')
|
||||
self.assertEqual(lsinfo_result, listplaylists_result)
|
||||
|
||||
def test_lsinfo_for_root_returns_same_as_listplaylists(self):
|
||||
lsinfo_result = self.h.handle_request(u'lsinfo "/"')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user