diff --git a/mopidy/mpd/frontend.py b/mopidy/mpd/frontend.py index ce2f40cc..a13e461c 100644 --- a/mopidy/mpd/frontend.py +++ b/mopidy/mpd/frontend.py @@ -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 diff --git a/tests/mpd/frontend_test.py b/tests/mpd/frontend_test.py index e4a9593c..4ec13436 100644 --- a/tests/mpd/frontend_test.py +++ b/tests/mpd/frontend_test.py @@ -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 "/"')