feat: DramaBox 全量走 App 接口,清单可停止并避免卡死
分类按 App 翻页,精选走推荐接口。清单顶部显示进度,停止后不再拉新剧,已拿到的封面继续加载。列表只绘制可见卡片,避免大量剧目占满主线程。
This commit is contained in:
@@ -7,6 +7,11 @@ from server.services.http import http
|
||||
router = APIRouter(prefix="/api")
|
||||
|
||||
|
||||
@router.get("/proxy")
|
||||
def get_proxy():
|
||||
return http.proxy_view()
|
||||
|
||||
|
||||
@router.post("/proxy")
|
||||
def set_proxy(body: ProxyBody):
|
||||
return call(lambda: _apply(body))
|
||||
@@ -14,4 +19,4 @@ def set_proxy(body: ProxyBody):
|
||||
|
||||
def _apply(body: ProxyBody) -> dict:
|
||||
http.configure_proxy(body.model_dump())
|
||||
return {"ok": True}
|
||||
return {"ok": True, "url": http.webview_proxy_url()}
|
||||
|
||||
Reference in New Issue
Block a user