Skip to content

Instantly share code, notes, and snippets.

@mvilrokx
Created December 9, 2012 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvilrokx/4244964 to your computer and use it in GitHub Desktop.
Save mvilrokx/4244964 to your computer and use it in GitHub Desktop.
Siriproxy Squeezebox plugin
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