P0/W2/TB: rewrite Home to wireframe spec, add site footer, expose CurrentTrack; fix dead base writes, genre href scroll-to-top

This commit is contained in:
Daniel Harvey
2026-05-17 21:52:19 -04:00
parent 583ff26fd7
commit 3d94e45d0c
7 changed files with 1017 additions and 217 deletions
@@ -24,6 +24,15 @@ public abstract class AudioPlayerService : IPlayerService, IAsyncDisposable
public double Volume { get; protected set; } = 0.8;
public double LoadProgress { get; protected set; } = 0;
public string? ErrorMessage { get; protected set; }
/// <summary>
/// The currently selected track. In the streaming subclass this property is managed
/// exclusively by <see cref="StreamingAudioPlayerService"/>: set in
/// <c>LoadTrackStreaming</c> after <c>ResetToIdle</c> clears it, and cleared again
/// by <c>ResetToIdle</c> on stop/unload/dispose. Base-class subclasses that take the
/// <see cref="SelectTrack"/>/<see cref="Unload"/> path are responsible for managing
/// it themselves.
/// </summary>
public TrackEntity? CurrentTrack { get; protected set; }
// Events
public EventCallback? OnStateChanged { get; set; }
@@ -68,12 +77,12 @@ public abstract class AudioPlayerService : IPlayerService, IAsyncDisposable
public virtual async Task SelectTrack(TrackEntity track)
{
await EnsureInitializedAsync();
await NotifyStateChanged();
if (OnTrackSelected.HasValue)
await OnTrackSelected.Value.InvokeAsync();
await LoadTrack(track);
await NotifyStateChanged();
}