summaryrefslogtreecommitdiff
path: root/libmpd/playlist.rb
diff options
context:
space:
mode:
Diffstat (limited to 'libmpd/playlist.rb')
-rw-r--r--libmpd/playlist.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/libmpd/playlist.rb b/libmpd/playlist.rb
index e7d1b32..d05141f 100644
--- a/libmpd/playlist.rb
+++ b/libmpd/playlist.rb
@@ -27,4 +27,14 @@ module MPDPlaylist
def playlistinfo
return split_and_hash send_request 'playlistinfo'
end
+
+ # Swaps the positions of the given songs, specified by playlist positions.
+ def swap first, second
+ return send_request 'swap %s %s' % [first, second]
+ end
+
+ # Swaps the positions of the given songs, specified by song ids.
+ def swapid first, second
+ return send_request 'swapid %s %s' % [first, second]
+ end
end