module Quiyo::Server

Public Instance Methods

list(type, arg = nil) click to toggle source
# File lib/quiyo/server.rb, line 33
def list(type, arg = nil)
        case type
        when "artists"
                @mpd.artists.each { |s| p s }
        when "albums"
                @mpd.albums(arg.drop(1).join(" ")).each { |s| p s }
        end
end
quit() click to toggle source
# File lib/quiyo/server.rb, line 12
def quit
        @mpd.disconnect
        Process.exit
end
vol(arg) click to toggle source
# File lib/quiyo/server.rb, line 17
def vol(arg)
        @mpd.volume=(arg)
rescue
        p "Usage: vol [0-100]"
end