添加新功能,完善项目

This commit is contained in:
truewhile
2026-09-22 16:22:29 +08:00
parent 47899284a5
commit b5ce4646cf
85 changed files with 7103 additions and 982 deletions
+20
View File
@@ -11,10 +11,30 @@ export interface HistoryItem {
media?: Media
}
export interface HistoryDailyStat {
day: string
watch_ms: number
plays: number
}
export interface HistoryTypeStat {
type: string
watch_ms: number
count: number
}
export interface HistoryStats {
total: number
completed: number
watched_ms: number
watched_hours: number
last_watched?: string
/** 正在看(未标记看完)的条目数。 */
in_progress?: number
/** 近 30 天中有观看记录的日子,未观看的日期不返回。 */
daily?: HistoryDailyStat[]
/** 按媒体库类型聚合的观看时长与条目数。 */
by_library_type?: HistoryTypeStat[]
/** 最近看过的若干条,含 media 详情用于渲染卡片。 */
recent?: Array<{ history: HistoryItem; media?: Media }>
}