From f6222122c0f02b3e2a5b62b434bc5708c7ad9e66 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 18 Apr 2024 21:00:57 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E8=AE=A2=E9=98=85=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E4=BB=A5=E5=8F=8AAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/endpoints/subscribe.py | 6 +++++- app/schemas/subscribe.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) 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