feat(release): front int PK with app-minted GUID EntryKey on the public addressing surface (P11 W5, 11.H)
This commit is contained in:
@@ -4,7 +4,7 @@ using DeepDrftPublic.Client.Services;
|
||||
namespace DeepDrftPublic.Client.ViewModels;
|
||||
|
||||
/// <summary>
|
||||
/// State for the Cut album-detail page (/cuts/{id}). Unlike <see cref="ReleaseDetailViewModel"/>
|
||||
/// State for the Cut album-detail page (/cuts/{entryKey}). Unlike <see cref="ReleaseDetailViewModel"/>
|
||||
/// (which resolves a single playable track for Session/Mix), a Cut is multi-track: it loads the
|
||||
/// release and the full ordered track list for that release. The list is fetched through the
|
||||
/// existing releaseId-filtered track page sorted by TrackNumber — the explicit 1-based ordinal
|
||||
@@ -40,7 +40,7 @@ public class CutDetailViewModel
|
||||
IsLoading = false;
|
||||
}
|
||||
|
||||
public async Task Load(long releaseId)
|
||||
public async Task Load(string entryKey)
|
||||
{
|
||||
IsLoading = true;
|
||||
NotFound = false;
|
||||
@@ -49,7 +49,7 @@ public class CutDetailViewModel
|
||||
|
||||
try
|
||||
{
|
||||
var releaseResult = await _releaseData.GetById(releaseId);
|
||||
var releaseResult = await _releaseData.GetByEntryKey(entryKey);
|
||||
if (releaseResult is not { Success: true, Value: { } release })
|
||||
{
|
||||
NotFound = true;
|
||||
@@ -59,9 +59,11 @@ public class CutDetailViewModel
|
||||
Release = release;
|
||||
|
||||
// The album's tracks via the releaseId-filtered page — an exact join, not a title string
|
||||
// (which collides across same-titled releases and breaks on rename). Sorted by TrackNumber
|
||||
// so rows render in saved order. A Cut with no streamable tracks simply leaves the list
|
||||
// empty (the page renders the header with no rows).
|
||||
// (which collides across same-titled releases and breaks on rename). The public page
|
||||
// addresses the release by EntryKey; the track→release join stays on the internal int FK
|
||||
// (Phase 11 §3e), so use the resolved release.Id here. Sorted by TrackNumber so rows render
|
||||
// in saved order. A Cut with no streamable tracks simply leaves the list empty (the page
|
||||
// renders the header with no rows).
|
||||
var trackResult = await _trackData.GetPage(
|
||||
pageNumber: 1,
|
||||
pageSize: AlbumPageSize,
|
||||
|
||||
Reference in New Issue
Block a user