From a23f9c8b2a71c18c9ab51e4f752f0a32d0c96312 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 24 Jul 2009 09:24:18 -0700 Subject: New swap and swapid methods in MPDPlaylist. --- libmpd/playlist.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libmpd/playlist.rb') 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 -- cgit v1.2.3-70-g09d2