mpd: Add rangeid command skeleton
This commit is contained in:
parent
a23e2bc23c
commit
7b711e4dac
@ -57,6 +57,11 @@ MPD frontend
|
||||
instead of "A, B". This is a part of updating our protocol implementation to
|
||||
match MPD 0.19. (PR: :issue:`1213`)
|
||||
|
||||
- Add skeletons of new or otherwise missing MPD commands that return a "not
|
||||
implemented" error:
|
||||
|
||||
- ``rangeid``
|
||||
|
||||
File backend
|
||||
------------
|
||||
|
||||
|
||||
@ -355,6 +355,22 @@ def prioid(context, *args):
|
||||
pass
|
||||
|
||||
|
||||
@protocol.commands.add('rangeid', tlid=protocol.UINT, songrange=protocol.RANGE)
|
||||
def rangeid(context, tlid, songrange):
|
||||
"""
|
||||
*musicpd.org, current playlist section:*
|
||||
|
||||
``rangeid {ID} {START:END}``
|
||||
|
||||
Specifies the portion of the song that shall be played. START and END
|
||||
are offsets in seconds (fractional seconds allowed); both are optional.
|
||||
Omitting both (i.e. sending just ":") means "remove the range, play
|
||||
everything". A song that is currently playing cannot be manipulated
|
||||
this way.
|
||||
"""
|
||||
raise exceptions.MpdNotImplemented # TODO
|
||||
|
||||
|
||||
@protocol.commands.add('shuffle', songrange=protocol.RANGE)
|
||||
def shuffle(context, songrange=None):
|
||||
"""
|
||||
|
||||
@ -386,6 +386,13 @@ class PlChangeCommandTest(BasePopulatedTracklistTestCase):
|
||||
self.assertInResponse('OK')
|
||||
|
||||
|
||||
class RangeIdCommandTest(protocol.BaseTestCase):
|
||||
|
||||
def test_rangeid(self):
|
||||
self.send_request('rangeid 17 0:30')
|
||||
self.assertEqualResponse('ACK [0@0] {rangeid} Not implemented')
|
||||
|
||||
|
||||
# TODO: we only seem to be testing that don't touch the non shuffled region :/
|
||||
class ShuffleCommandTest(BasePopulatedTracklistTestCase):
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user