115 Commits

Author SHA1 Message Date
jxxghp
10e9ade7de fix(site): preserve text category IDs and replay resource configs 2026-10-31 17:25:29 +08:00
LIN student
4dfcac8d04 fix(site): skip search parameters when listing site categories
- 站点分类接口只收集分类配置中的列表分组和字典项;field、delimiter、
  param 等搜索请求参数不再被当成分类逐字符返回,避免响应校验失败导致
  站点分类请求 500。
- 补充带搜索参数和非法分类项的回归测试,并校验结果符合接口响应模型。

Refs #7250

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:02:40 +08:00
jxxghp
42edfd1da8 fix(api): bound collection views and query calendar dates (#7200) 2026-10-27 00:40:09 +08:00
jxxghp
6d4ce83837 fix(types): clear host mypy debt and prevent typing regressions
严格检查全部宿主源码,清零类型错误预算并移除按模块类型豁免。
按原因、所属方法、错误码及语法指纹锁定必要兼容例外和站点类型桩,
CI 阻断新增忽略、检查范围退化、本地桩替代真实接口及新的类型错误。

修复空值、异步和供应方类型边界,保持插件与 API 兼容合同,
并补充存储、订阅、通知、Agent 和工作流边界的回归覆盖。
2026-10-21 22:03:18 +08:00
GuanAllen
458329b3f7 fix(indexer): 透传 mTorrent、HDDolby、Yema 的站点分类 (#7080)
* fix(indexer): 站点资源页页码归一化并让 mTorrent/HDDolby/Yema 支持分类透传

站点资源页传 1 起始页码,链路按 0 起始处理,mTorrent 再 +1 后请求 pageNumber=2,
导致单页关键词搜索返回空;同时站点页选择的分类没有透传到专站适配器,
Movie/TV 预置分类互相覆盖,分类筛选不生效。

- site.py: page 传入前归一化为 max(page-1, 0)
- indexer: mTorrent/HDDolby/Yema 专站参数补充 cat
- mtorrent.py: search/async_search/__get_params 支持 cat,显式分类优先
- hddolby.py: search/async_search/__get_params 支持 cat,显式分类优先
- yema.py: search/async_search/_prepare_search_requests 支持 cat,显式分类优先

* fix(indexer): preserve browse paging and support category lists

---------

Co-authored-by: GuanAllen <guanyelin@users.noreply.github.com>
Co-authored-by: jxxghp <jxxghp@gmail.com>
2026-10-19 18:33:28 +08:00
DDSRem
e0642eafa7 chore(types): reduce v3 host mypy debt (#7057)
* chore(types): clear AniList endpoint mypy debt

* chore(types): clear Douban endpoint mypy debt

* chore(types): clear recommendation endpoint mypy debt

* chore(types): clear subscription notification mypy debt

* chore(types): clear SDK string compatibility mypy debt

* chore(types): ratchet v3 host mypy across remaining files

* chore(types): reduce v3 host mypy debt and retire ledger

* chore(types): reconcile host snapshot with upstream HTTP pool

* test(types): cover host paths exposed by mypy cleanup
2026-10-18 09:37:49 +08:00
DDSRem
2de976f6b3 Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
docs: 统一全项目中文注释和结构化契约说明
2026-10-17 19:26:29 +08:00
jxxghp
669b7d1054 refactor(types): align site with typed route contracts 2026-10-17 03:00:22 +08:00
LIN student
3bdf09dc6f fix(site): 非超级管理员读取订阅站点和域名详情时不返回认证字段
/site/rss 与 /site/domain/{site_url} 只依赖 verify_token,直接返回完整的
Site 模型,其中包含 cookie、apikey、token、rss。同模块的 /site/agent 已经
对非超级管理员剔除这些字段,/site/ 列表也要求 manage 权限,两个接口与之
不一致。

前端订阅编辑和工作流「获取种子」动作只用到站点的 id、name、is_active,
因此非超级管理员改为复用 _project_agent_site(include_secrets=False) 投影,
超级管理员保持原有完整字段。

read_rss_sites 的返回标注由 List[dict] 改为实际的 Site 或投影字典,site.py
的 mypy 债务减少 2(return-value、type-arg 各 1),已固化低水位并同步文档
指标。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 19:01:22 +08:00
jxxghp
1cb1f02f19 fix(auth): normalize site authentication parameters 2026-09-14 13:24:14 +08:00
Aqr-K
5e232ca14d fix(plugin): 安装记录大小写不敏感查询、游标物化,site 端点改从 Application 取 (#6682)
* fix(plugin): 安装 journal 按大小写不敏感列出事务记录

create 用 func.lower 判定同一物理插件并据此拒绝重复占位,list 却还是等值过滤。
判据分叉后,恢复流程查不到那条被 create 认定为未收尾的 journal,会认为没有待恢复
事务,而新事务又永远被同一行挡住。list 改用与 create 相同的 func.lower 判据。

* fix(plugin): 批量读插件身份时在事务内物化游标

list_by_plugin_ids 无会话调用时由组合根另开短事务,会话在 lambda 返回后立即关闭,
外层再 list() 消费惰性游标会撞上 "identity map is no longer valid",一行都读不到。
补上 .all(),让行在事务内取完。

* refactor(api): site 端点从 Application 取插件路由刷新

register_plugin_api 的唯一拥有者是 app.application.plugin.routes,
dependencies/plugin.py、scheduler/reconcile.py 与 initializers/plugins.py 都已从那里
取用,只剩 site 端点还在向 plugin 端点横向借。改为同一来源,并加门禁锁住这条判据。

依赖基线相应下降一条边(8650 -> 8649:site 不再到达 app.api.endpoints 与
app.api.endpoints.plugin,改为到达 app.application.plugin.routes),mypy 低水位同步
下降一条 attr-defined,两处文档数字随之更新。

---------

Co-authored-by: jxxghp <jxxghp@gmail.com>
2026-09-14 07:18:50 +08:00
jxxghp
4d4327e25a fix(site): report unauthenticated userdata refresh failures 2026-09-12 21:19:58 +08:00
jxxghp
ed6439bf2e fix(architecture): close mypy ratchet regressions 2026-09-11 15:24:46 +08:00
jxxghp
06ed22c584 feat(agent): improve browser-assisted site cookie login 2026-09-11 14:31:01 +08:00
jxxghp
e656793aa5 refactor(api): split management endpoint routers 2026-09-05 16:05:27 +08:00
jxxghp
f00853de2a feat(api): expose frontend-safe management capabilities 2026-09-05 15:11:02 +08:00
jxxghp
d512f528be refactor(api): make collection pagination explicit 2026-09-01 09:13:56 +08:00
jxxghp
e5722ed987 fix: finalize agent architecture ratchets 2026-09-01 01:46:22 +08:00
jxxghp
6d4d7331d1 refactor: complete agent skill API contracts 2026-09-01 01:19:45 +08:00
jxxghp
c656da1e28 refactor(site): close typed persistence boundary 2026-08-28 12:37:30 +08:00
jxxghp
b914e8b6e4 refactor: strengthen architecture CI gates and runtime contracts 2026-08-25 17:02:29 +08:00
jxxghp
4dd2d7fed2 refactor: use explicit runtime facade getters 2026-08-24 03:56:54 +08:00
jxxghp
e9a226af02 refactor: complete command facade migration 2026-08-24 00:00:37 +08:00
InfinityPacer
f7f5a7e107 fix(api): use async site query for mapping (#6416) 2026-08-23 17:54:26 +08:00
InfinityPacer
e1d7918297 fix(runtime): 收口调度与事件异步任务生命周期 (#6415) 2026-08-23 17:17:59 +08:00
jxxghp
f1e542bef0 refactor: govern background tasks and query ownership 2026-08-23 13:24:04 +08:00
InfinityPacer
3d7fb44dc7 refactor(database): isolate configuration transactions 2026-08-23 02:29:22 +08:00
jxxghp
97d2dcd7fb fix(ci): align architecture and pylint gates 2026-08-22 08:50:25 +08:00
jxxghp
9df599f502 refactor: split api dependencies by domain 2026-08-21 21:09:57 +08:00
jxxghp
8472bcff43 refactor: 收口 V3 分层架构与插件兼容边界 2026-08-18 13:22:02 +08:00
jxxghp
5128ae9e1e refactor: 推进后端分层架构治理 2026-08-18 00:29:14 +08:00
jxxghp
96118e73e7 refactor(string): split utilities by responsibility 2026-08-15 08:03:55 +08:00
Aqr-K
8a11214a43 refactor(db): 修复异步连接池无界增长,并完成 SQLAlchemy 2.0 迁移与分层归位 (#6320) 2026-08-15 06:58:38 +08:00
jxxghp
369d7d6448 refactor: reorganize backend module boundaries 2026-08-14 19:53:33 +08:00
jxxghp
7b3444c366 refactor backend module architecture 2026-08-14 15:45:38 +08:00
jxxghp
baf8850d63 refactor(api): standardize responses and restore media config contracts 2026-08-12 23:15:13 +08:00
jxxghp
36666313b7 feat: 按媒体类型筛选搜索站点 2026-08-09 18:12:29 +08:00
jxxghp
05d15a04f5 feat(v3): add music automation workflow 2026-08-07 21:50:22 +08:00
jxxghp
36d4434596 fix: allow manage users to access management APIs 2026-07-05 20:23:04 +08:00
jxxghp
16ada1a6c4 feat(site): add POST /site/cookie/{site_id} endpoint for updating site Cookie&UA via request body
- Introduce SiteCookieUpdate schema for structured cookie update requests
- Add POST endpoint to update site Cookie&UA using JSON body
- Refactor cookie update logic into shared _update_site_cookie function
- Update SKILL.md to document new endpoint and endpoint count
- Add tests for both POST and legacy GET cookie update endpoints
2026-05-31 09:11:09 +08:00
DDSRem
5a585839ba chore: remove unused imports and fix function name conflicts (#5764)
- Remove unused imports in anthropic.py, tmdbv3api/__init__.py, tv.py, test files
- Rename conflicting function names in subscribe.py and webhook.py
- Clean up unused re-exports in tmdbv3api/__init__.py (15 unused exports)
- Apply consistent formatting across API endpoints
2026-05-13 18:59:03 +08:00
jxxghp
f390647139 fix(site): 更新站点信息时同步更新domain域名 2026-02-12 06:59:13 +08:00
jxxghp
147a477365 fix site 2025-11-18 21:13:45 +08:00
jxxghp
13171f636f fix 2025-11-18 20:34:53 +08:00
jxxghp
d523c7c916 fix pydantic 2025-11-01 09:51:23 +08:00
jxxghp
8ab233baef fix bug 2025-08-01 16:39:40 +08:00
jxxghp
0c8fd5121a fix async apis 2025-08-01 14:19:34 +08:00
jxxghp
71f7bc7b1b fix 2025-07-30 21:06:55 +08:00
jxxghp
f14f4e1e9b 添加异步数据库支持,更新相关模型和会话管理 2025-07-30 13:18:45 +08:00
jxxghp
ea433ff807 add site api 2025-07-18 08:04:05 +08:00