diff --git a/app/api/endpoints/subscribe.py b/app/api/endpoints/subscribe.py index a10e1482..55c384bf 100644 --- a/app/api/endpoints/subscribe.py +++ b/app/api/endpoints/subscribe.py @@ -314,7 +314,11 @@ def read_subscribe( """ 查询电影/电视剧订阅历史 """ - return SubscribeHistory.list_by_type(db, mtype=mtype, page=page, count=count) + historys = SubscribeHistory.list_by_type(db, mtype=mtype, page=page, count=count) + for history in historys: + if history and history.sites: + history.sites = json.loads(history.sites) + return historys @router.delete("/history/{history_id}", summary="删除订阅历史", response_model=schemas.Response) diff --git a/app/schemas/subscribe.py b/app/schemas/subscribe.py index 7398463b..ac2a592f 100644 --- a/app/schemas/subscribe.py +++ b/app/schemas/subscribe.py @@ -62,6 +62,8 @@ class Subscribe(BaseModel): save_path: Optional[str] = None # 是否使用 imdbid 搜索 search_imdbid: Optional[int] = 0 + # 时间 + date: Optional[str] = None class Config: orm_mode = True