diff options
| author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-24 09:24:18 -0700 | 
|---|---|---|
| committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-24 09:24:18 -0700 | 
| commit | a23f9c8b2a71c18c9ab51e4f752f0a32d0c96312 (patch) | |
| tree | afb66313916f9143a644b0362e247da969a7f767 | |
| parent | 955c75a3d2b9d66175ee78a523500f4cc514bac8 (diff) | |
| download | ruby-libmpd-a23f9c8b2a71c18c9ab51e4f752f0a32d0c96312.tar.gz ruby-libmpd-a23f9c8b2a71c18c9ab51e4f752f0a32d0c96312.tar.xz | |
New swap and swapid methods in MPDPlaylist.
| -rw-r--r-- | libmpd/playlist.rb | 10 | 
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 | 
