summaryrefslogtreecommitdiff
path: root/mpdlib.rb
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-21 16:55:06 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-21 16:55:06 -0700
commitce643b5be296ec114e07152669fbd33240b57cc1 (patch)
tree00e525e507f4f46086162efd109932568219dc1f /mpdlib.rb
parentc417cacd322a37be2e4e65cfeb5149cd6ddb0a1f (diff)
downloadruby-libmpd-ce643b5be296ec114e07152669fbd33240b57cc1.tar.gz
ruby-libmpd-ce643b5be296ec114e07152669fbd33240b57cc1.tar.xz
Add add and delete methods.
Diffstat (limited to 'mpdlib.rb')
-rw-r--r--mpdlib.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/mpdlib.rb b/mpdlib.rb
index dc11bd1..7d4d33d 100644
--- a/mpdlib.rb
+++ b/mpdlib.rb
@@ -89,4 +89,12 @@ class MPD
def seek songpos, time
return send_request 'seek %s %s' % [songpos, time]
end
+
+ def add uri
+ return send_request 'add "%s"' % uri
+ end
+
+ def delete songpos
+ return send_request 'delete ' + songpos.to_s
+ end
end