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

Find command tested.

This commit is contained in:
glucaci 2016-12-12 17:31:35 +01:00
parent c8a7621b38
commit f75031ca49

View File

@ -61,24 +61,7 @@ namespace LibMpc
/* /*
#region Database Commands #region Database Commands
/// <summary>
/// Returns all files in the database who's attribute matches the given token. Works like the Search command but is case sensitive.
/// </summary>
/// <param name="tag">Specifies the attribute to search for.</param>
/// <param name="token">The value the files attribute must have to be included in the result.</param>
/// <returns>All files in the database who's attribute matches the given token.</returns>
public async Task<List<MpdFile>> FindAsync(ITag tag, string token)
{
if (token == null)
throw new ArgumentNullException("token");
MpdResponse response = await _connection.SendAsync("find", new string[] { tag.Value, token });
if (response.State.Error)
throw new MpdResponseException(response.ErrorCode, response.ErrorMessage);
return MpdFile.buildList(response);
}
/// <summary> /// <summary>
/// Returns all values found in files of the MPD for the given attribute. /// Returns all values found in files of the MPD for the given attribute.
/// </summary> /// </summary>