Created
December 9, 2012 13:54
-
-
Save mvilrokx/4244964 to your computer and use it in GitHub Desktop.
Siriproxy Squeezebox plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SiriProxy::Plugin::Squeezebox < SiriProxy::Plugin | |
def initialize(config) | |
@s = Squeezeboxer.new(config) | |
end | |
listen_for /radio on/i do | |
@s.power('1') | |
say "Radio is now turned on!" | |
request_completed | |
end | |
listen_for /radio of/i do | |
@s.power('0') | |
say "Radio is now turned off!" | |
request_completed | |
end | |
listen_for /artist (.+)/i do |artist_name| | |
@s.playlist("loadtracks contributor.namesearch=#{artist_name}") | |
say "Playing songs by #{artist_name}" | |
request_completed | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment