Files
Estrella Pan 396a92787e fix: 回滚后再升级时重新备份 3.x 数据库,单个下载器重命名出错不拖垮其它实例
- version_check: 数据库仍是 3.x 结构(schema ≤ 24)时备份并原子替换 data.db.v3.bak,
  回滚 3.3 后再升级也会刷新备份;只留一份,迁移失败的重启循环不会堆积
- rename_all: 实例内的异常记录后继续下一个实例
- 文档:回滚步骤删除 data.db-wal/-shm、还原编号最大的配置备份;schema v28
- 插件 skill 改用 httpx2、补全示例列表;示例 README 先安装 SDK 轮子再测试
- 准备 4.0.0-beta.9
2026-10-24 11:00:56 +02:00

26 lines
890 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# NFO 写入(示例插件)
种子整理完成后,在每个正片旁写一个 Kodi / Jellyfin 格式的 `.nfo`(只含剧名、季、集)。演示:
- `@subscribe(TorrentOrganized.kind)`:事件为「至少一次」投递,插件自己保证幂等(`.nfo` 已存在就跳过)
- 事件里的路径是下载器视角,用 `path_from` / `path_to` 换成本地路径
- 文件操作放进 `asyncio.to_thread`,不阻塞事件循环
刷新媒体库不需要写插件:内置插件 `media-server-refresh` 已经支持 Jellyfin / Emby / Plex。
## 安装
```bash
cp -r examples/plugins/nfo-writer config/plugins/local/
```
在「设置 → 插件」中开启「允许未签名插件」并启用。
## 测试
```bash
cd examples/plugins/nfo-writer
uv add ../autobangumi_sdk-0.6.0-py3-none-any.whl # SDK 不在 PyPI:换成下载的轮子的实际路径
uv run pytest
```