docs: reflect live home-hero stats (duration column, stats endpoint, backfill, NowPlayingStats wiring)
This commit is contained in:
@@ -15,7 +15,8 @@ DeepDrftModels/
|
||||
├── Entities/
|
||||
│ └── TrackEntity.cs # Database entity for tracks
|
||||
├── DTOs/
|
||||
│ └── TrackDto.cs # DTO mirror of TrackEntity
|
||||
│ ├── TrackDto.cs # DTO mirror of TrackEntity
|
||||
│ └── HomeStatsDto.cs # Aggregate figures for the public home hero stat row
|
||||
├── Models/
|
||||
│ ├── PagingParameters.cs # Pagination configuration (base + generic)
|
||||
│ └── PagedResult.cs # Paginated result wrapper
|
||||
@@ -35,6 +36,7 @@ public string? Album { get; set; } // Optional album (max 200)
|
||||
public string? Genre { get; set; } // Optional genre (max 100)
|
||||
public DateOnly? ReleaseDate { get; set; } // Optional release date
|
||||
public string? ImagePath { get; set; } // Optional image URL (max 500)
|
||||
public double? DurationSeconds { get; set; } // Audio runtime in seconds (nullable; populated at upload, backfilled for older rows)
|
||||
```
|
||||
|
||||
**No `MediaPath` field exists.** That was a legacy name. The field is `EntryKey`.
|
||||
@@ -47,6 +49,17 @@ Convention: required reference fields use `required` modifier; optional referenc
|
||||
|
||||
Mirrors `TrackEntity` structure (identical fields, same nullability). Used where DTO/entity separation is needed for serialisation. In practice, both flow over the wire today, but the separation is available if APIs need to diverge (e.g., hide `Id` in responses).
|
||||
|
||||
## HomeStatsDto
|
||||
|
||||
Aggregate figures behind the public home hero stat row (`NowPlayingStats`). A single round-trip returns everything the three cards need. Fields:
|
||||
|
||||
- `CutTrackCount` (int): total non-deleted tracks on Cut-medium releases.
|
||||
- `CutReleaseTypeCounts` (`List<CutReleaseTypeCount>`): per-`ReleaseType` Cut release counts; zero-count types are absent (suppressed server-side).
|
||||
- `MixReleaseCount` (int): total non-deleted Mix-medium releases.
|
||||
- `MixRuntimeSeconds` (double): sum of `DurationSeconds` across all non-deleted tracks on Mix releases (null durations count as 0). Rendered as `hh:mm` by `RuntimeFormat` on the client.
|
||||
|
||||
`CutReleaseTypeCount` is a nested type (`ReleaseType`, `Count` int) defined in the same file.
|
||||
|
||||
## Pagination system
|
||||
|
||||
### PagingParameters (base)
|
||||
|
||||
Reference in New Issue
Block a user