chiark / gitweb /
debian/.gitignore: Move existing patterns from top-level `.gitignore'.
[disorder] / python / disorder.py.in
index d06c7eef7f5773d2f205187f58dabd5b47626f1e..8a758c9bc11a586a631d6dc5f96722ba368cee51 100644 (file)
@@ -87,6 +87,7 @@ class Error(Exception):
   """Base class for DisOrder exceptions."""
 
 class _splitError(Error):
+  """Error parsing a quoted string list"""
   # _split failed
   def __init__(self, value):
     self.value = value
@@ -439,6 +440,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.
 
@@ -613,7 +624,7 @@ class client:
     track -- the track to modify
     key -- the preference to remove
     """
-    self._simple("set", track, key, value)
+    self._simple("set", track, key)
 
   def get(self, track, key):
     """Get a preference value.
@@ -833,7 +844,7 @@ class client:
     Arguments:
     key -- the preference to remove
     """
-    self._simple("set-global", key, value)
+    self._simple("set-global", key)
 
   def getglobal(self, key):
     """Get a global preference value.