mpd-example changed. uses librmpd

This commit is contained in:
Denis Knauf 2010-04-11 18:31:00 +02:00
parent 377ef00063
commit 032b3dc04d

View file

@ -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