Merge pull request #906 from jodal/feature/mpd-browse-empty-dir
mpd: Enable browsing of empty dirs
This commit is contained in:
commit
2be42b0848
@ -421,8 +421,6 @@ def lsinfo(context, uri=None):
|
||||
if uri in (None, '', '/'):
|
||||
result.extend(protocol.stored_playlists.listplaylists(context))
|
||||
|
||||
if not result:
|
||||
raise exceptions.MpdNoExistError('Not found')
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@ -351,6 +351,13 @@ class MusicDatabaseHandlerTest(protocol.BaseTestCase):
|
||||
self.assertInResponse('directory: dummy/foo')
|
||||
self.assertInResponse('OK')
|
||||
|
||||
def test_lsinfo_for_empty_dir_returns_nothing(self):
|
||||
self.backend.library.dummy_browse_result = {
|
||||
'dummy:/': []}
|
||||
|
||||
self.sendRequest('lsinfo "/dummy"')
|
||||
self.assertInResponse('OK')
|
||||
|
||||
def test_lsinfo_for_dir_does_not_recurse(self):
|
||||
self.backend.library.dummy_library = [
|
||||
Track(uri='dummy:/a', name='a'),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user