Documentation
¶
Overview ¶
Package stats aggregates per-user usage statistics from data the app already records (library resume positions, downloads, search history, watchlists). Pure functions over store rows — no DB access of its own, so every aggregation is unit-testable without SQLite.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LibraryAgg ¶
type LibraryAgg struct {
Titles int `json:"titles"`
Completed int `json:"completed"`
InProgress int `json:"inProgress"`
WatchSeconds float64 `json:"watchSeconds"` // accumulated playback position (approximation: rewatches don't add)
ByKind map[string]int `json:"byKind"` // "video" | "audio" | "other"
PlaysByWeekday [7]int `json:"playsByWeekday"` // 0 = Sunday, local time
PlaysByHour [24]int `json:"playsByHour"` // local time
AddedByMonth []MonthCount `json:"addedByMonth"` // last 6 months, chronological
}
LibraryAgg summarizes the user's playback library.
type MonthCount ¶
MonthCount is one bar of the additions-per-month series.
Click to show internal directories.
Click to hide internal directories.