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:
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user