mpd-example changed. uses librmpd
This commit is contained in:
parent
377ef00063
commit
032b3dc04d
12
README.md
12
README.md
|
@ -1,8 +1,8 @@
|
|||
Description
|
||||
===========
|
||||
|
||||
lircr (pronounced 'lurker') is a LIRC client library for Ruby. It's simple,
|
||||
it's easy, it's fun. If you got LIRC, get lircr. I am not responsible if you
|
||||
lircr (pronounced 'lurker') is a LIRC client library for Ruby. It is simple,
|
||||
it is easy, it is fun. If you got LIRC, get lircr. I am not responsible if you
|
||||
grow more hair on your index finger or thumb.
|
||||
|
||||
Usage
|
||||
|
@ -19,14 +19,16 @@ Usage
|
|||
Control your MPD:
|
||||
|
||||
require 'lirc'
|
||||
require 'librmpd'
|
||||
lirc = LIRC::Client.new
|
||||
mpd = MPD.new 'localhost', 6600
|
||||
lirc.each do |event|
|
||||
case event.name
|
||||
when "play"
|
||||
system "mpc", "play"
|
||||
mpc.play
|
||||
when "pause"
|
||||
system "mpc", "pause"
|
||||
mpd.pause = !mpd.pause
|
||||
when "stop"
|
||||
system "mpc", "stop"
|
||||
mpd.stop
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue