diff options
-rw-r--r-- | mpdlib.rb | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -36,4 +36,14 @@ class MPD response << line end end + + def currentsong + response = send_request('currentsong') + hash = Hash.new + + response.split("\n").each do |line| + field, value = line.split(': ') + hash[field] = value + end + end end |