feat(stats): flip home Plays card live (Phase 16.5)

Add TotalPlays + UniqueListeners to HomeStatsDto, composed at
StatsController from IEventService (no migration). Card reads via
existing persistent-state-bridged round-trip.
This commit is contained in:
daniel-c-harvey
2026-06-19 15:26:07 -04:00
parent cfcc2693f2
commit be1a55fd37
7 changed files with 123 additions and 13 deletions
+14
View File
@@ -54,6 +54,20 @@ public class EventManager : IEventService
}
}
public async Task<ResultContainer<long>> GetTotalPlayCount(CancellationToken cancellationToken = default)
{
try
{
var count = await _repository.CountTotalPlaysAsync(cancellationToken);
return ResultContainer<long>.CreatePassResult(count);
}
catch (Exception e)
{
_logger.LogError(e, "Failed to count total plays");
return ResultContainer<long>.CreateFailResult(e.Message);
}
}
public async Task<ResultContainer<int>> GetDistinctListenerCount(CancellationToken cancellationToken = default)
{
try