Make release Medium writable via upload + meta-edit; resolve detail-page track by releaseId not album title
This commit is contained in:
@@ -95,6 +95,11 @@ public class TrackRepository : Repository<DeepDrftContext, TrackEntity>
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(filter.Genre))
|
||||
query = query.Where(t => t.Release != null && t.Release.Genre == filter.Genre);
|
||||
|
||||
// Exact release-id join. ReleaseId is a column on the track itself, so this needs no
|
||||
// navigation guard — it is the authoritative alternative to the Album title match.
|
||||
if (filter.ReleaseId is { } releaseId)
|
||||
query = query.Where(t => t.ReleaseId == releaseId);
|
||||
}
|
||||
|
||||
var totalCount = await query.CountAsync(ct);
|
||||
|
||||
Reference in New Issue
Block a user