mpd: Add listfiles command skeleton
This commit is contained in:
parent
2135b1372a
commit
c88cf5ee82
@ -60,13 +60,22 @@ MPD frontend
|
||||
- Add "not implemented" skeletons of new commands in the MPD protocol version
|
||||
0.19:
|
||||
|
||||
- ``rangeid``
|
||||
- ``addtagid``
|
||||
- ``cleartagid``
|
||||
- ``mount``
|
||||
- ``unmount``
|
||||
- ``listmounts``
|
||||
- ``listneighbors``
|
||||
- Current playlist:
|
||||
|
||||
- ``rangeid``
|
||||
- ``addtagid``
|
||||
- ``cleartagid``
|
||||
|
||||
- Mounts and neighbors:
|
||||
|
||||
- ``mount``
|
||||
- ``unmount``
|
||||
- ``listmounts``
|
||||
- ``listneighbors``
|
||||
|
||||
- Music DB:
|
||||
|
||||
- ``listfiles``
|
||||
|
||||
File backend
|
||||
------------
|
||||
|
||||
@ -349,6 +349,29 @@ def listallinfo(context, uri=None):
|
||||
return result
|
||||
|
||||
|
||||
@protocol.commands.add('listfiles')
|
||||
def listfiles(context, uri=None):
|
||||
"""
|
||||
*musicpd.org, music database section:*
|
||||
|
||||
``listfiles [URI]``
|
||||
|
||||
Lists the contents of the directory URI, including files are not
|
||||
recognized by MPD. URI can be a path relative to the music directory or
|
||||
an URI understood by one of the storage plugins. The response contains
|
||||
at least one line for each directory entry with the prefix "file: " or
|
||||
"directory: ", and may be followed by file attributes such as
|
||||
"Last-Modified" and "size".
|
||||
|
||||
For example, "smb://SERVER" returns a list of all shares on the given
|
||||
SMB/CIFS server; "nfs://servername/path" obtains a directory listing
|
||||
from the NFS server.
|
||||
|
||||
.. versionadded:: MPD protocol 0.19
|
||||
"""
|
||||
raise exceptions.MpdNotImplemented # TODO
|
||||
|
||||
|
||||
@protocol.commands.add('lsinfo')
|
||||
def lsinfo(context, uri=None):
|
||||
"""
|
||||
|
||||
@ -295,6 +295,10 @@ class MusicDatabaseHandlerTest(protocol.BaseTestCase):
|
||||
self.assertInResponse('directory: /dummy/a')
|
||||
self.assertInResponse('directory: /dummy/a [2]')
|
||||
|
||||
def test_listfiles(self):
|
||||
self.send_request('listfiles')
|
||||
self.assertEqualResponse('ACK [0@0] {listfiles} Not implemented')
|
||||
|
||||
def test_lsinfo_without_path_returns_same_as_for_root(self):
|
||||
last_modified = 1390942873222
|
||||
self.backend.playlists.set_dummy_playlists([
|
||||
|
||||
Loading…
Reference in New Issue
Block a user