Sha256: 295e0f8c5dd50ca6f67376bcb9ead43ed1c5ce817ffd8c04a34263b82c0e6779

Contents?: true

Size: 756 Bytes

Versions: 3

Compression:

Stored size: 756 Bytes

Contents

#

def runmpdcommand
	
require 'lib/librmpd'
require 'thread'

		mpd = MPD.new
		mpd.connect
		
	temparray = @a_mpdcommand.to_s.split('|') 
   case 	temparray.length
	   when 1
	commandtext = @a_mpdcommand.to_s
	temparrayresult =  mpd.send(commandtext.intern)
	when 2
           commandtext =temparray[0]
           temparrayresult =  mpd.send(commandtext.intern,temparray[1] )
	   
        end

mpd.disconnect
   tmpresult = ""
   @mpdcommandresult = temparrayresult 
   begin
   temparrayresult.each {|x|
   tmpresult = tmpresult + "\n#{x}"
                                       }
        @mpdcommandresult =     tmpresult
   rescue
   @mpdcommandresult = temparrayresult 
   if $DEBUG
	   $stderr.puts "error mpd_client.rb"
   end
   end

end




Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rwdmpd-0.07 code/superant.com.rwdmp3/mpd_client.rb
rwdmpd-0.08 code/superant.com.rwdmp3/mpd_client.rb
rwdmpd-0.06 code/superant.com.rwdmp3/mpd_client.rb