All pastes #75217 Raw Edit

SocketEventHandler.r

public ruby v1 · immutable
#75217 ·published 2006-06-29 22:52 UTC
rendered paste body
	def nowPlaying()		data = {}		time = nil    	rset = $xmms.medialib_get_info(getCurrentSongID).wait.value    	time = $xmms.playback_playtime().wait.value#    	time = (time/1000)    	    	    	artist = rset[:server][:artist]    	title = rset[:server][:title]    	data ={'artist' => artist, 'title' => title, 'time' => time}    	return data	end		def getCurrentSongID()        id = $xmms.playback_current_id.wait.value	end## OPLETTEUH!#		if command == "/nowPlaying" 			return nowPlaying().to_json		end				"No such command"	end