Add statistics data models for charts - #361
Draft
dmoo500 wants to merge 3 commits into
Draft
Conversation
added 2 commits
August 14, 2026 22:49
- Add DistributionItem for genre/artist distribution charts - Add TimeSeriesPoint for plays over time - Add HeatmapPoint for listening activity heatmap - Add ListeningTimeItem for time-based aggregations
This was referenced Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix?
Adds data models for the new Statistics Controller feature, defining the structure for playlog analytics responses (top items, distributions, time series, heatmaps, listening time).
Related issue (if applicable):
New Models
TopItemResult: Combines ItemMapping with play_count for top chartsDistributionItem: Name/value pairs for pie/bar charts (artists, genres, decades)TimeSeriesPoint: Timestamp/value pairs for line charts (plays over time)HeatmapPoint: Hour/weekday/value tuples for activity heatmapsListeningTimeItem: Name/minutes pairs for listening time chartsTypes of changes
new-featureChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/serveris linked.Related PRs