#! /usr/bin/env ruby
require 'socket'
require 'json'

args = Hash[*ARGV]

UNIXSocket.new(File.expand_path('~/.LOLastfm/socket')).tap {|socket|
	if args['url']
		socket.puts [:hint, [:stream, args['title'], args['comment']]].to_json
	end

	socket.flush
	socket.close
}
