fix: 修复聚合RSS崩溃、空过滤器误杀种子、添加OneBot v11通知支持等#1032
Closed
AMYdd00 wants to merge 8 commits into
Closed
Conversation
修复内容: - match_list 空 title_index 保护 (bangumi.py) - 过滤器空值保护 (request_contents.py) - entrypoint.sh CRLF 换行符修复 - 默认端口 7892 -> 37892 - 添加 __version__.py 版本号文件 - Dockerfile 改为全使用 ghcr.io 镜像,加入前端编译产物
- 后端 /status API 新增 platform 字段,返回 linux/windows - 前端下载器设置页显示当前平台标识 - 添加「路径转换」按钮,一键在 /downloads/ 和 D:\ 之间切换
- Add OneBotProvider for sending notifications via OneBot v11 HTTP API - Support both private and group messages - Support poster image attachment - Add message_type config field (private/group) - Register OneBotProvider in provider registry - Add frontend UI for OneBot configuration - Add API endpoint support for message_type field - Add unit tests for OneBotProvider
|
@AMYdd00 is attempting to deploy a commit to the estrellaxd's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 包含多个修复和新功能,主要解决 AutoBangumi 3.2.x 版本中的几个关键问题,并新增 OneBot v11 (QQ) 通知推送支持。
🐛 Bug 修复
1. 修复聚合 RSS
KeyError崩溃文件:
backend/src/module/database/bangumi.pymatch_list方法中,当title_index为空时,re.compile("")会匹配任意字符串,导致后续逻辑出现KeyError。添加了空值保护,提前返回所有 torrent 作为未匹配项。2. 修复空过滤器误杀全部种子
文件:
backend/src/module/network/request_contents.py当
filter配置为空列表时,"|".join([])得到空字符串"",re.search("", x)永远返回匹配成功,导致所有种子被过滤掉。修复后,空过滤器直接跳过正则匹配,保留所有种子。3. 修复 webui/types/config.ts 中文注释乱码
文件:
webui/types/config.ts修复了中文注释在编码转换过程中出现的乱码问题。
✨ 新功能
4. 新增 OneBot v11 (QQ) 通知推送支持
新增文件:
backend/src/module/notification/providers/onebot.py修改文件:
backend/src/module/notification/__init__.pybackend/src/module/models/config.pybackend/src/module/api/notification.pywebui/src/api/notification.tswebui/src/components/setting/config-notification.vuewebui/types/config.tsbackend/src/test/test_notification.py支持通过 OneBot v11 协议(兼容 LLOneBot、go-cqhttp、Lagrange.OneBot 等)发送番剧更新通知到 QQ。
配置字段:
url: OneBot HTTP API 地址token: 可选 access_tokenchat_id: 目标 QQ 号或群号message_type:private(私聊)或group(群聊)海报图片支持: 自动处理本地海报文件,读取后转为 base64 格式发送,确保 OneBot 能正常显示。
5. 下载路径自动转换 Windows/Linux 路径
文件:
backend/src/module/core/program.py在 Windows 和 Linux 双平台下自动转换下载路径格式,解决跨平台路径分隔符不兼容问题。
🔧 其他改进
6. 默认端口改为 37892
文件:
backend/src/module/conf/const.py将默认 WebUI 端口从
7892改为37892,避免与其他常见服务端口冲突。7. 添加版本号文件
文件:
backend/src/module/__version__.py(新增)添加版本文件,避免 DEV 模式跳转到 FastAPI 文档页面。
文件变更清单
backend/src/module/database/bangumi.pybackend/src/module/network/request_contents.pybackend/src/module/notification/providers/onebot.pybackend/src/module/notification/__init__.pybackend/src/module/models/config.pybackend/src/module/api/notification.pybackend/src/module/conf/const.pybackend/src/module/__version__.pybackend/src/module/core/program.pybackend/src/test/test_notification.pywebui/types/config.tswebui/src/api/notification.tswebui/src/components/setting/config-notification.vue.gitignore__version__.py