1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2024-09-16 05:30:09 +00:00

Implement DatabaseList response list

This commit is contained in:
Petr Kracik 2020-01-06 12:58:55 +01:00
parent 0edc0c322a
commit f999ef6f8c

View File

@ -7,13 +7,14 @@
namespace MpcNET.Commands.Database
{
using System.Collections.Generic;
using System.Linq;
using MpcNET.Tags;
/// <summary>
/// Lists the specified tag.
/// https://www.musicpd.org/doc/protocol/database.html.
/// </summary>
public class ListCommand : IMpcCommand<string>
public class ListCommand : IMpcCommand<List<string>>
{
private readonly ITag tag;
@ -41,12 +42,11 @@ namespace MpcNET.Commands.Database
/// <returns>
/// The deserialized response.
/// </returns>
public string Deserialize(IReadOnlyList<KeyValuePair<string, string>> response)
public List<string> Deserialize(IReadOnlyList<KeyValuePair<string, string>> response)
{
// TODO:
return response.ToString();
return response.Select(x => x.Value).ToList();
}
}
// TODO: rescan
}
}