chiark / gitweb /
Add new 'playafter' command to protocol, eclient and python.
[disorder] / python / disorder.py.in
index d06c7eef7f5773d2f205187f58dabd5b47626f1e..fe054a9474aec4ef684cfec3e8efff3b30835a45 100644 (file)
@@ -439,6 +439,16 @@ class client:
     res, details = self._simple("play", track)
     return unicode(details)             # because it's unicode in queue() output
 
+  def playafter(self, target, tracks):
+    """Insert tracks into a specific point in the queue.
+
+    Arguments:
+    target -- target ID or None to insert at start of queue
+    tracks -- a list of tracks to play"""
+    if target is None:
+      target = ''
+    self._simple("playafter", target, *tracks)
+
   def remove(self, track):
     """Remove a track from the queue.