diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-21 16:30:07 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-21 16:30:07 -0700 |
commit | 435377c3c5d10724ffd7d1e6f1341107a3c27276 (patch) | |
tree | 8a75df3e2f78d19aa872b556e5c9c50255078794 | |
parent | 4265dc8dd0e680d29ed97294b9e698c7675df4e8 (diff) | |
download | ruby-libmpd-435377c3c5d10724ffd7d1e6f1341107a3c27276.tar.gz ruby-libmpd-435377c3c5d10724ffd7d1e6f1341107a3c27276.tar.xz |
Add play, pause and stop methods.
-rw-r--r-- | mpdlib.rb | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -63,6 +63,21 @@ class MPD return generate_hash send_request 'stats' end + def play songpos=false + command = 'play' + command << ' ' + songpos.to_s if songpos + + return send_request command + end + + def pause pause + return send_request 'pause ' + pause.to_s + end + + def stop + return send_request 'stop' + end + def next return send_request 'next' end |