mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-11 08:10:39 +08:00
/search/media/{media_id} 与 /search/title 的 response_model 声明为
Response[list[TorrentInfo]],而 SearchChain.async_search_by_id 与
async_search_by_title 实际返回的是 List[Context]。
Context.to_dict() 产出 {meta_info, media_info, torrent_info} 三层结构,
与 TorrentInfo 的字段完全不相交,被 pydantic 按 response_model 序列化后
所有字段都变成 null,接口对外返回一批空壳数据。
改为与同文件 /search/last 一致的 List[_SchemaContext],
由 ResponseAPIRouter 统一包装成 Response[List[Context]]。