example: mpd.connect. readline -> gets
This commit is contained in:
parent
d185528889
commit
8e2368bf95
|
@ -22,6 +22,7 @@ Control your MPD:
|
|||
require 'librmpd'
|
||||
lirc = LIRC::Client.new
|
||||
mpd = MPD.new 'localhost', 6600
|
||||
mpd.connect
|
||||
lirc.each do |event|
|
||||
case event.name
|
||||
when "play"
|
||||
|
|
|
@ -8,7 +8,7 @@ module LIRC
|
|||
end
|
||||
|
||||
def next
|
||||
Event.new @sock.readline
|
||||
Event.new @sock.gets
|
||||
end
|
||||
|
||||
def each_event
|
||||
|
|
Loading…
Reference in a new issue