From 7ce1db1a0560bf3db0095a68390c06e3b8235f7e Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 24 Jul 2009 14:17:15 -0700 Subject: Automatically determine current song for seek. --- libmpd/playbackcontrol.rb | 11 +++-------- 1 file 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. -- cgit v1.2.3-70-g09d2