Commit Graph
379 Commits
Author SHA1 Message Date
InfinityPacer f64030a074 fix(imports): use concrete modules for internal symbols (#6427) 2026-08-23 21:28:37 +08:00
jxxghp baf4e883b2 refactor: route storage adapter settings through runtime 2026-08-23 03:25:08 +08:00
jxxghp dd6405389c refactor: route storage module settings through runtime 2026-08-23 03:12:51 +08:00
jxxghp 5128ae9e1e refactor: 推进后端分层架构治理 2026-08-18 00:29:14 +08:00
InfinityPacer 24671f8f18 refactor(runtime): lazily activate host modules (#6331) 2026-08-16 16:07:38 +08:00
jxxghp 7d0cf76d9c fix(storage): 修复通用管理契约下存储页报未知错误
- usage 动作返回的 StorageUsage pydantic 模型无法透过
  Response[Dict[str, Any]] 开放映射校验导致 500,统一转为 dict
- support_transtype 返回值恢复 transtype 包装结构,与前端期望一致
- 空结果(无用量/无整理方式)恢复成功空结构语义,
  不再因 bool(结果) 被前端客户端当作业务失败弹窗
- dashboard 用量聚合改为 dict 取值;新增响应校验与空结果回归测试
2026-08-16 07:50:29 +08:00
jxxghp a6dbd799d5 refactor(api): 渠道与存储管理端点通用化,端点层零目标特色
- schemas 新增公共 ManageRequest(target+action+params) 与 StorageAction 词汇表
- endpoint 层收敛为 POST /notification/manage、/storage/manage 两个通用接口,
  不再定义任何渠道/存储特定的名称、参数与响应字段,前端上送参数原样透传
- chain 层 manage_channel/manage_storage 接受字符串标识纯透明转发,
  StorageChain 移除全部特色管理方法
- FileManagerModule 新增 storage_manage 统一入口,模块返回归一化为
  {success, message, data};wechatclawbot channel_manage 同步归一化,
  路由标识兼容枚举名/值/对象
- dashboard 与 agentopsassistant 的用量查询改走 manage_storage(usage)
- 新增 10 项存储契约守护测试,通知侧补充 3 项链透传与字符串路由测试,
  API 守护测试对 ManageRequest 开放映射按设计豁免
2026-08-16 07:18:49 +08:00
jxxghp 02f0dd0b9a refactor(architecture): 修复模块依赖违规并强化架构守护
- 字幕编排上移 DownloadChain.download_site_subtitles,SubtitleModule 仅保留站点链接解析
- TransferChain.recommend_name 上移 TV episodes_info 获取,filemanager 模块不再导入 TmdbChain
- endpoint 穿透修复:WXBizMsgCrypt3 迁至 adapters/external/wechat_crypt.py;
  music/tmdb 缓存管理、listenbrainz 常量、TMDbException、WechatClawBot 辅助统一经 chain 包装
- RuleParser 与 builtin_rules 合并为 application/filter_rules.py;
  fsproxy/fsworker 迁至 adapters/system/
- chain/__init__.py 删除 qbittorrentapi/transmission_rpc 导入,消除后端协议类型泄漏
- 架构守护测试新增三项检查:模块间隔离、入口层穿透、下载器 SDK 泄漏
- 文档同步:05-architecture.md 记录 DB/Oper 聚合例外与迁移文件位置,AGENTS.md 更新所有权表
2026-08-16 04:59:17 +08:00
jxxghp 96118e73e7 refactor(string): split utilities by responsibility 2026-08-15 08:03:55 +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
kami 626e6cb472 fix(storage): refresh 115 upload token when SecurityTokenExpired (#6296) 2026-08-13 15:23:29 +08:00
Aqr-K eeec40cce3 fix(monitor): 消除探测饿死与重试饥饿导致的跨目录连坐 (#6291) 2026-08-13 14:00:50 +08:00
Aqr-KandAqr-K a2e70b443d fix(monitor,transfer): 修复 FUSE 挂载无响应导致的监控冻死、整理链锁死与漏件 (#6276)
* wip(v3): 移植监控与整理韧性修复到 v3 基线

包含:监控看门狗隔离/挂载探测、整理队列持久化、文件系统子进程代理、
写入原子化。迁移重挂到 v3 链 8a4c7e1d2f90 -> 7f5c1d2e3a4b -> e3d9f4b7c806。
tmdb 相关测试尚未通过,待定位。

* fix(v3): 修正移植引入的 16 项测试失败

- poller.py:合并时我方保留的行仍用旧变量名 merged_snapshot,而 v3 已统一
  改名为 current_snapshot,导致 NameError 被外层 except 吞掉、快照从未保存
- smb.py:采纳 f-string 拆分写法,恢复 Python 3.11 可解析
- dispatcher 测试:历史查重由 _should_skip_by_history 统一承担,mock 点随之调整
- tmdb 缓存测试:补充 v3 新增的 media_source/media_id 字段
- tmdb 重试测试:为 fake 补充 match_multi/async_match_multi

尚余 3 项与 v3 识别流程的连接失败处理有关,待单独判断。

* fix(v3): 测试适配 v3 的 media_source/media_id 重构

v3 将媒体标识从 tmdbid 统一重构为 media_source + media_id,recognize_media
的 tmdbid 参数已被 **kwargs 静默吞掉——传了也不生效,流程会误降级到名称搜索。
tmdb 重试用例改用新参数后恢复正确路径。

同时修正 fake 的 match_multi 语义:真实实现(tmdbapi.match_multi)吞掉所有
异常并返回 None,连接失败与「未找到」在该路径上本就不可区分,fake 需保持一致。

至此移植引入的 19 项失败全部清零。

---------

Co-authored-by: Aqr-K <Aqr-K@users.noreply.github.com>
2026-08-13 08:19:54 +08:00
jxxghp baf8850d63 refactor(api): standardize responses and restore media config contracts 2026-08-12 23:15:13 +08:00
jxxghp 97dba2a8ae feat: unify media recognition and music lifecycle 2026-08-12 06:51:58 +08:00
jxxghp 5c7e09d407 fix(monitor): 修正远程快照文件数量累计 2026-08-09 16:37:25 +08:00
jxxghp 964e3c0b8e test: 补充 AListGo 与特典整理回归验证 2026-08-09 14:53:13 +08:00
naughtyGitCat 3eed518f83 fix(transhandler): suppress noisy error notification for TV special and extra sample files without episode numbers
BD-BOX releases for Anime and TV shows frequently contain extra non-episode video files (such as NCOP, NCED, Menu, PV, CM, SP, Event, Logo, etc.). When transferring these single files, the lack of an episode number previously logged a warning and triggered a noisy '整理失败:未识别到文件集数' notification to users.

This change identifies known special/extra file patterns when begin_episode is None, logs them at INFO level, and suppresses the error notification while returning success to avoid false-positive failure alerts.
2026-08-09 14:48:18 +08:00
okatu-loli 2bf2d89c52 fix(storages): 令牌缓存失效范围限定为当前存储凭据 2026-08-09 14:48:18 +08:00
okatu-loli 7650ec5cef feat(storages): 新增 AList 存储类型 2026-08-09 14:48:18 +08:00
jxxghp 05d15a04f5 feat(v3): add music automation workflow 2026-08-07 21:50:22 +08:00
jxxghp d8adb4fbfe fix(u115): handle missing path response 2026-08-03 08:16:45 +08:00
Aqr-K cf80b551f9 fix(monitor): 目录监控自愈、快照语义修正与覆盖保护闭环 (#6210) 2026-07-30 06:53:52 +08:00
jxxghp 7a5e565b15 fix(storage): 保留目标目录继承权限 (#6189) 2026-07-26 09:12:35 +08:00
zangse c6611f6210 fix(system): add opt-in Btrfs FSID space deduplication (#6141) 2026-07-22 17:55:17 +08:00
InfinityPacer 5588e37c6d fix: preserve season zero semantics (#6150) 2026-07-20 06:55:23 +08:00
kuke2733 229824a417 feat(subscribe): merge mediaserver library entries into files info (#6131) 2026-07-16 17:36:56 +08:00
jxxghp 93e907d032 fix: remove openlist directory via fs remove 2026-07-05 17:24:44 +08:00
InfinityPacer a4f6e13881 fix(transfer): expose file meta in intercept event (#6019) 2026-06-29 06:44:40 +08:00
jxxghp 68f18db374 Handle invalid UTF-8 with replacement decoding 2026-06-21 09:56:34 +08:00
jxxghp e49e1626ee fix: add method to retrieve or create a folder in supported storage 2026-06-10 19:04:49 +08:00
jxxghp a0b3800f6b fix: prevent cloud storage download path traversal 2026-06-05 17:43:06 +08:00
Album a9b1f7e9c9 fix(alist): support openlist rapid upload headers (#5897) 2026-06-05 06:50:20 +08:00
jxxghp 2255b61195 fix: latest覆盖模式误删多Part文件 (fix #5862) 2026-05-30 20:28:26 +08:00
jxxghp 2b2e088784 fix: improve u115 multipart upload handling 2026-05-27 15:02:03 +08:00
jxxghp db8363fee1 fix(openlist): request full directory pages 2026-05-26 18:12:10 +08:00
jxxghp 79539760da fix: bound long-lived cache state 2026-05-24 18:03:42 +08:00
jxxghp fd4d162287 fix: respect OpenList directory path contract 2026-05-20 22:28:38 +08:00
jxxghp 617692616c fix: build complete transfer result at source 2026-05-20 22:09:57 +08:00
jxxghp e00aa42f94 fix: prevent duplicate transfer uploads 2026-05-20 16:39:07 +08:00
jxxghp 72ead2970c fix: tolerate delayed OpenList metadata 2026-05-20 15:53:56 +08:00
jxxghp 3ec0964a01 fix: handle OpenList delayed transfer metadata 2026-05-20 13:08:45 +08:00
InfinityPacer 9e0846961f feat(filemanager): add TransferRenameBuild chain event and fix TemplateContextBuilder concurrency (#5792) 2026-05-20 09:41:42 +08:00
XiaoChao Fang cdddd8e080 fix: preserve tv bluray disc folders (#5788) 2026-05-19 16:42:23 +08:00
DDSRemandClaude Sonnet 4.6 1af3a0ef59 fix: handle None items in alipan list to prevent TypeError (#5765)
When the Aliyun Drive API returns an error response (e.g. UserNotAllowedAccessDrive), resp.get("items") is None, causing len() to raise TypeError. Extract items with a safe default to fix the crash and avoid a potential infinite loop.

Fix https://github.com/jxxghp/MoviePilot/issues/5664

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 19:09:45 +08:00
jxxghp f0bc1bd681 fix: prevent storage operations in preview mode and add tests for transfer preview logic 2026-05-13 13:39:57 +08:00
album 05b34b9c26 feat(transfer): 增加手动整理预览模式(preview mode)
- ManualTransferItem/TransferTask 增加 preview 字段,支持同一接口双模式
- /api/v1/transfer/manual 透传 preview,预览时返回结构化结果不落盘
- ChainBase.transfer 增加 preview 参数并透传到 run_module
- TransferChain.do_transfer 预览分支复用完整命名/覆盖判定逻辑(dry-run)
- TransferChain.do_transfer 预览结束后显式 finish_task/fail_task,避免任务残留 running 状态导致重复预览失败
- TransHandler.transfer_media 预览分支跳过实际 copy/move/link/delete,仅返回目标路径
- FileManagerModule.transfer 透传 preview 参数
- 修复 /manual 失败分支 dict 类型导致 Response.message 校验错误
- 兼容性:preview 字段有默认值,旧客户端不传参时行为不变
2026-05-12 10:14:58 +08:00
jxxghp ffbe348d66 fix(openlist): paginate Alist directory listings
Fetch all OpenList/AList fs/list pages when using the default per_page=0 to avoid truncating directories at 200 entries. Add an isolated regression test for the auto-pagination behavior.

Fixes #5723
2026-05-07 13:09:28 +08:00
jxxghp 5d588ee127 fix: correct traditional Chinese subtitle rename detection
Fixes #5703
2026-04-28 09:00:14 +08:00