diff --git a/docs/changelog.rst b/docs/changelog.rst index eebc3b0c..bbf03bfb 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -61,6 +61,8 @@ MPD frontend implemented" error: - ``rangeid`` + - ``addtagid`` + - ``cleartagid`` File backend ------------ diff --git a/mopidy/mpd/protocol/current_playlist.py b/mopidy/mpd/protocol/current_playlist.py index 1b1d3bbd..0433bba7 100644 --- a/mopidy/mpd/protocol/current_playlist.py +++ b/mopidy/mpd/protocol/current_playlist.py @@ -430,8 +430,7 @@ def swapid(context, tlid1, tlid2): swap(context, position1, position2) -# TODO: add at least reflection tests before adding NotImplemented version -# @protocol.commands.add('addtagid', tlid=protocol.UINT) +@protocol.commands.add('addtagid', tlid=protocol.UINT) def addtagid(context, tlid, tag, value): """ *musicpd.org, current playlist section:* @@ -442,12 +441,13 @@ def addtagid(context, tlid, tag, value): for remote songs. This change is volatile: it may be overwritten by tags received from the server, and the data is gone when the song gets removed from the queue. + + .. versionadded:: MPD protocol 0.19 """ - pass + raise exceptions.MpdNotImplemented # TODO -# TODO: add at least reflection tests before adding NotImplemented version -# @protocol.commands.add('cleartagid', tlid=protocol.UINT) +@protocol.commands.add('cleartagid', tlid=protocol.UINT) def cleartagid(context, tlid, tag): """ *musicpd.org, current playlist section:* @@ -457,5 +457,7 @@ def cleartagid(context, tlid, tag): Removes tags from the specified song. If TAG is not specified, then all tag values will be removed. Editing song tags is only possible for remote songs. + + .. versionadded:: MPD protocol 0.19 """ - pass + raise exceptions.MpdNotImplemented # TODO diff --git a/tests/mpd/protocol/test_current_playlist.py b/tests/mpd/protocol/test_current_playlist.py index 6f3961fa..81bec5a4 100644 --- a/tests/mpd/protocol/test_current_playlist.py +++ b/tests/mpd/protocol/test_current_playlist.py @@ -459,3 +459,14 @@ class SwapCommandTest(BasePopulatedTracklistTestCase): self.send_request('swapid "8" "0"') self.assertEqualResponse( 'ACK [50@0] {swapid} No such song') + + +class TagCommandTest(protocol.BaseTestCase): + + def test_addtagid(self): + self.send_request('addtagid 17 artist Abba') + self.assertEqualResponse('ACK [0@0] {addtagid} Not implemented') + + def test_cleartagid(self): + self.send_request('cleartagid 17 artist') + self.assertEqualResponse('ACK [0@0] {cleartagid} Not implemented')