summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-24 14:17:15 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-24 14:17:15 -0700
commit7ce1db1a0560bf3db0095a68390c06e3b8235f7e (patch)
tree44c394ff8c8436e288c721c87b3f0c9dc6a43a8c
parentca7025bb256c3901084d4206f9673abf175d5169 (diff)
downloadruby-libmpd-7ce1db1a0560bf3db0095a68390c06e3b8235f7e.tar.gz
ruby-libmpd-7ce1db1a0560bf3db0095a68390c06e3b8235f7e.tar.xz
Automatically determine current song for seek.
-rw-r--r--libmpd/playbackcontrol.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/libmpd/playbackcontrol.rb b/libmpd/playbackcontrol.rb
index 2eb13c2..8c47f0b 100644
--- a/libmpd/playbackcontrol.rb
+++ b/libmpd/playbackcontrol.rb
@@ -61,14 +61,9 @@ module MPDPlaybackControl
return send_request('previous')
end
- # Seeks to the given position of the given song.
- def seek(songpos, time)
- return send_request('seek %s %s' % [songpos, time])
- end
-
- # Seeks to the given position of the given song id.
- def seekid(songid, time)
- return send_request('seekid %s %s' % [songid, time])
+ # Seeks to the given position of the current song.
+ def seek(time)
+ return send_request('seek %s %s' % [status[:song], time])
end
# Stops playing.