mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-11-06 23:47:52 +08:00
- webhook-on-event、custom-rss-site、template-rename、nfo-writer、ntfy-notifier - scripts/test_example_plugins.sh 对每个示例运行 ab-plugin validate 与自带测试 - 宿主侧测试把全部示例载入 PluginManager,断言 Provider 与钩子已登记 - NotifierContract 发现 ntfy 示例的中文标题请求头缺陷,已改用 bytes 请求头
645 B
645 B
ntfy 通知(示例插件)
把通知发到 ntfy 主题。演示:
@provider(points.NOTIFIER, id="ntfy"):返回NotifierFactory- 凭据放在插件的
config_model里,渠道条目只带通用模板 - 后端拒绝时
send返回False而不抛异常 - 契约套件
NotifierContract
安装
cp -r examples/plugins/ntfy-notifier config/plugins/local/
在「设置 → 插件」中开启「允许未签名插件」,启用并填写主题;再到「设置 → 通知 → 添加渠道」选择类型 ntfy。
测试
cd examples/plugins/ntfy-notifier && uv run pytest