mpd: Add prio/prioid command skeleton
This commit is contained in:
parent
2f8d625324
commit
0a662c42b0
@ -324,9 +324,8 @@ def plchangesposid(context, version):
|
||||
return result
|
||||
|
||||
|
||||
# TODO: add at least reflection tests before adding NotImplemented version
|
||||
# @protocol.commands.add(
|
||||
# 'prio', priority=protocol.UINT, position=protocol.RANGE)
|
||||
@protocol.commands.add(
|
||||
'prio', priority=protocol.UINT, position=protocol.RANGE)
|
||||
def prio(context, priority, position):
|
||||
"""
|
||||
*musicpd.org, current playlist section:*
|
||||
@ -339,11 +338,10 @@ def prio(context, priority, position):
|
||||
A priority is an integer between 0 and 255. The default priority of new
|
||||
songs is 0.
|
||||
"""
|
||||
pass
|
||||
raise exceptions.MpdNotImplemented # TODO
|
||||
|
||||
|
||||
# TODO: add at least reflection tests before adding NotImplemented version
|
||||
# @protocol.commands.add('prioid')
|
||||
@protocol.commands.add('prioid')
|
||||
def prioid(context, *args):
|
||||
"""
|
||||
*musicpd.org, current playlist section:*
|
||||
@ -352,7 +350,7 @@ def prioid(context, *args):
|
||||
|
||||
Same as prio, but address the songs with their id.
|
||||
"""
|
||||
pass
|
||||
raise exceptions.MpdNotImplemented # TODO
|
||||
|
||||
|
||||
@protocol.commands.add('rangeid', tlid=protocol.UINT, songrange=protocol.RANGE)
|
||||
@ -367,6 +365,8 @@ def rangeid(context, tlid, songrange):
|
||||
Omitting both (i.e. sending just ":") means "remove the range, play
|
||||
everything". A song that is currently playing cannot be manipulated
|
||||
this way.
|
||||
|
||||
.. versionadded:: MPD protocol 0.19
|
||||
"""
|
||||
raise exceptions.MpdNotImplemented # TODO
|
||||
|
||||
|
||||
@ -386,6 +386,17 @@ class PlChangeCommandTest(BasePopulatedTracklistTestCase):
|
||||
self.assertInResponse('OK')
|
||||
|
||||
|
||||
class PrioCommandTest(protocol.BaseTestCase):
|
||||
|
||||
def test_prio(self):
|
||||
self.send_request('prio 255 0:10')
|
||||
self.assertEqualResponse('ACK [0@0] {prio} Not implemented')
|
||||
|
||||
def test_prioid(self):
|
||||
self.send_request('prioid 255 17 23')
|
||||
self.assertEqualResponse('ACK [0@0] {prioid} Not implemented')
|
||||
|
||||
|
||||
class RangeIdCommandTest(protocol.BaseTestCase):
|
||||
|
||||
def test_rangeid(self):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user