summaryrefslogtreecommitdiff
path: root/mpdlib.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mpdlib.rb')
-rw-r--r--mpdlib.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/mpdlib.rb b/mpdlib.rb
index 7d4d33d..70eb016 100644
--- a/mpdlib.rb
+++ b/mpdlib.rb
@@ -97,4 +97,18 @@ class MPD
def delete songpos
return send_request 'delete ' + songpos.to_s
end
+
+ def clear
+ return send_request 'clear'
+ end
+
+ # Not yet complete.
+ def playlistinfo
+ playlist = send_request 'playlistinfo'
+ playlist = playlist.split(/(?!\n)(?=file:)/).map do |song|
+ generate_hash song
+ end
+
+ return playlist
+ end
end