mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-24 21:03:48 +08:00
HistoryQueryService.count_download() 依赖 AsyncDownloadHistoryQueryRepository 协议的 async_count(),但 startup 注入的请求级适配器 SessionDownloadHistoryRepository 只实现了 async_list_by_page(),导致 GET /api/v1/history/download 在写入分页总数响应头时抛 AttributeError 并返回 500, Web 端下载历史页面无法加载。 为 SessionDownloadHistoryRepository 补齐 async_count(),在请求持有的 AsyncSession 内调用 DownloadHistoryOper.async_count(),Session 类型校验与 async_list_by_page() 保持一致,并补充回归测试。