1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-02 00:57:38 +00:00

Response from MPD will be specific type. MpdDirectory and MpdFile created. Metadata for MpdFile still to be done.

This commit is contained in:
glucaci
2016-12-19 12:12:22 +01:00
parent 15c81b96e9
commit f6653e0075
15 changed files with 275 additions and 711 deletions

View File

@ -14,16 +14,13 @@ namespace LibMpc
// TODO: commands
// TODO: notcommands
public class TagTypes : IMpcCommand<IList<string>>
public class TagTypes : IMpcCommand<IEnumerable<string>>
{
public string Value => "tagtypes";
IDictionary<string, IList<string>> IMpcCommand<IList<string>>.FormatResponse(IList<KeyValuePair<string, string>> response)
public IEnumerable<string> FormatResponse(IList<KeyValuePair<string, string>> response)
{
var result = new Dictionary<string, IList<string>>
{
{ "tagtypes", response.Where(item => item.Key.Equals("tagtype")).Select(item => item.Value).ToList() }
};
var result = response.Where(item => item.Key.Equals("tagtype")).Select(item => item.Value);
return result;
}