diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-08-01 13:10:30 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-08-01 13:10:30 -0700 |
commit | a5b89802ef7614b214e92a1e6b03ebc17e3557b5 (patch) | |
tree | 3666470265f4481810d5f6474dde6d5ffe032ae0 /libmpd/playlist.rb | |
parent | 86d08df03202ac183c1f38b47765f2a4cfcafd72 (diff) | |
download | ruby-libmpd-a5b89802ef7614b214e92a1e6b03ebc17e3557b5.tar.gz ruby-libmpd-a5b89802ef7614b214e92a1e6b03ebc17e3557b5.tar.xz |
Various cleanup.
Diffstat (limited to 'libmpd/playlist.rb')
-rw-r--r-- | libmpd/playlist.rb | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/libmpd/playlist.rb b/libmpd/playlist.rb index 1b591c6..000f9c9 100644 --- a/libmpd/playlist.rb +++ b/libmpd/playlist.rb @@ -11,36 +11,35 @@ # Collection of methods related to the playlist. module MPDPlaylist - # Adds the specified file to the playlist. (Directories add recursively.) - def add uri - return send_request 'add "%s"' % uri + # Adds the specified file to the playlist. + # Directories add recursively. + def add(uri) + return send_request('add "%s"' % uri) end # Deletes a song from the playlist. - def delete songpos - return send_request 'delete ' + songpos.to_s + def delete(songpos) + return send_request('delete %s' % songpos) end # Clears the playlist. def clear - return send_request 'clear' + return send_request('clear') end # Returns an Array composed of Hashes containing information about the songs # in the playlist. - # - # Not yet complete. - def playlistinfo - return split_and_hash send_request 'playlistinfo' + def playlist + 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] + 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] + return send_request('swapid %s %s' % [first, second]) end end |