feat:订阅历史以及API
This commit is contained in:
parent
3a18267ec0
commit
f6222122c0
@ -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)
|
@router.delete("/history/{history_id}", summary="删除订阅历史", response_model=schemas.Response)
|
||||||
|
@ -62,6 +62,8 @@ class Subscribe(BaseModel):
|
|||||||
save_path: Optional[str] = None
|
save_path: Optional[str] = None
|
||||||
# 是否使用 imdbid 搜索
|
# 是否使用 imdbid 搜索
|
||||||
search_imdbid: Optional[int] = 0
|
search_imdbid: Optional[int] = 0
|
||||||
|
# 时间
|
||||||
|
date: Optional[str] = None
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
orm_mode = True
|
orm_mode = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user