From 71367cea5920a891b4c6660b2fd61d50ab6fc43d Mon Sep 17 00:00:00 2001 From: Gabriel Date: Mon, 5 Dec 2016 09:45:20 +0100 Subject: [PATCH] Send Mpc command to execute. --- LibMpc/Mpc.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/LibMpc/Mpc.cs b/LibMpc/Mpc.cs index 21236ec..a56e0b8 100644 --- a/LibMpc/Mpc.cs +++ b/LibMpc/Mpc.cs @@ -52,6 +52,16 @@ namespace LibMpc } } + // TODO: create response type + public async Task SendAsync(IMpcCommand command) + { + var mpdResponse = await _connection.Exec(command.Value); + var respose = command.ParseResponse(mpdResponse); + + return respose; + } + + #region Admin Commands /// /// Disables an MPD output.