This commit is contained in:
truewhile
2026-11-04 10:16:12 +08:00
parent 9b8ca33279
commit 9ffac320c4
19 changed files with 856 additions and 19 deletions
+12
View File
@@ -10,6 +10,18 @@ export const historyAPI = {
.get<HistoryItem[]>('/watch-history', { params: { limit } })
.then((r) => r.data),
/**
* 只要历史行、不要内嵌的 media。
*
* 媒体详情页解析「继续播放」只需要 media_id/position_ms;带上 media 会让
* 300 条响应大一个数量级,而且服务端还得为每条去查 media(挂载条目逐条
* 回源)。服务端已经支持 include_media=0 跳过 hydrate。
*/
listRows: (limit = 300) =>
api
.get<HistoryItem[]>('/watch-history', { params: { limit, include_media: false } })
.then((r) => r.data),
stats: () => api.get<HistoryStats>('/watch-history/stats').then((r) => r.data),
continueWatching: (limit = 10) =>