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

Formatting output responsability of command.

Commands: disableoutput, enableoutput, outputs, tagtypes, update implemented.
This commit is contained in:
glucaci
2016-12-07 10:34:55 +01:00
parent 4a176e8f45
commit 4ffa4bca6c
6 changed files with 50 additions and 37 deletions

View File

@ -24,9 +24,9 @@ namespace LibMpc
public string Value => string.Join(" ", "find", _tag.Value, _searchText);
public IReadOnlyDictionary<string, IList<string>> FormatResponse(IReadOnlyDictionary<string, IList<string>> response)
public IDictionary<string, string> FormatResponse(IList<KeyValuePair<string, string>> response)
{
return response;
return response.ToDefaultDictionary();
}
}
@ -41,9 +41,9 @@ namespace LibMpc
public string Value => string.Join(" ", "list", _tag);
public IReadOnlyDictionary<string, IList<string>> FormatResponse(IReadOnlyDictionary<string, IList<string>> response)
public IDictionary<string, string> FormatResponse(IList<KeyValuePair<string, string>> response)
{
return response;
return response.ToDefaultDictionary();
}
}
@ -60,9 +60,9 @@ namespace LibMpc
public string Value => string.Join(" ", "listall", _path);
public IReadOnlyDictionary<string, IList<string>> FormatResponse(IReadOnlyDictionary<string, IList<string>> response)
public IDictionary<string, string> FormatResponse(IList<KeyValuePair<string, string>> response)
{
return response;
return response.ToDefaultDictionary();
}
}
@ -79,9 +79,9 @@ namespace LibMpc
// TODO: Extend command: < update [URI] >
public string Value => "update";
public IReadOnlyDictionary<string, IList<string>> FormatResponse(IReadOnlyDictionary<string, IList<string>> response)
public IDictionary<string, string> FormatResponse(IList<KeyValuePair<string, string>> response)
{
return response;
return response.ToDefaultDictionary();
}
}