Esempio n. 1
0
func executeJSONRPCEx(method string, retVal interface{}, args []interface{}) error {
	if args == nil {
		args = Args{}
	}
	conn, err := getConnection(XBMCExJSONRPCHosts...)
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	client := jsonrpc.NewClient(conn)
	return client.Call(method, args, retVal)
}
Esempio n. 2
0
func executeJSONRPCEx(method string, retVal interface{}, args []interface{}) error {
	if args == nil {
		args = Args{}
	}
	conn, err := getConnection(XBMCExJSONRPCHosts...)
	if err != nil {
		log.Error(err.Error())
		Notify("Quasar", "executeJSONRPCEx failed, check your logs.", "")
	}
	defer conn.Close()

	client := jsonrpc.NewClient(conn)
	return client.Call(method, args, retVal)
}