1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-01 08:47:36 +00:00

UrlHandlers command implemented and tested. Print MPD version in test.

This commit is contained in:
glucaci
2016-12-20 11:31:48 +01:00
parent 4cb95df50f
commit ef57b0a76b
4 changed files with 25 additions and 2 deletions

View File

@ -41,7 +41,18 @@ namespace LibMpc
}
}
// TODO: urlhandlers
public class UrlHandlers : IMpcCommand<IEnumerable<string>>
{
public string Value => "urlhandlers";
public IEnumerable<string> FormatResponse(IList<KeyValuePair<string, string>> response)
{
var result = response.Where(item => item.Key.Equals("handler")).Select(item => item.Value);
return result;
}
}
// TODO: decoders
}
}

View File

@ -24,6 +24,7 @@ namespace LibMpc
}
public bool IsConnected => _connection?.IsConnected ?? false;
public string Version => _connection?.Version ?? "Unknown";
public async Task<bool> ConnectAsync()
{