feat: add search/album/genre filtering and /albums + /genres browse pages

This commit is contained in:
daniel-c-harvey
2026-06-10 10:54:56 -04:00
parent 1071ba7374
commit 5cae83b9ed
24 changed files with 940 additions and 15 deletions
+27
View File
@@ -0,0 +1,27 @@
namespace DeepDrftModels.DTOs;
/// <summary>
/// Cross-project track filter contract. Threaded alongside (never inside) the external
/// <c>PagingParameters&lt;T&gt;</c>, which cannot carry a where-clause. An instance with all
/// properties null is equivalent to no filter — see <c>TrackFilter.IsEmpty</c>.
/// </summary>
public class TrackFilter
{
/// <summary>Free-text, case-insensitive LIKE across TrackName, Artist, and Album.</summary>
public string? SearchText { get; set; }
/// <summary>Exact album match.</summary>
public string? Album { get; set; }
/// <summary>Exact genre match.</summary>
public string? Genre { get; set; }
/// <summary>
/// True when no predicate is set. An empty filter must produce identical results to a null
/// filter, so callers collapse it to null before querying.
/// </summary>
public bool IsEmpty =>
string.IsNullOrWhiteSpace(SearchText)
&& string.IsNullOrWhiteSpace(Album)
&& string.IsNullOrWhiteSpace(Genre);
}