diff --git a/backend/src/ab_sdk/downloader.py b/backend/src/ab_sdk/downloader.py index 790a912b..5ed9a54a 100644 --- a/backend/src/ab_sdk/downloader.py +++ b/backend/src/ab_sdk/downloader.py @@ -4,7 +4,7 @@ :data:`DownloaderFactory`:接收连接参数,返回实现 :class:`DownloaderClient` (至少 :class:`CoreDownloaderClient`)的对象。不同下载器能力不同,通过 ``capabilities`` 类属性声明,门面会跳过不支持的操作而不是报错。 -用户在设置里把 ``downloader.type`` 设为该 id 即可启用。 +用户在设置里把下载器实例的 ``provider`` 设为该 id 即可启用。 """ from collections.abc import Callable diff --git a/backend/src/ab_sdk/events.py b/backend/src/ab_sdk/events.py index f4cb7778..eddf8752 100644 --- a/backend/src/ab_sdk/events.py +++ b/backend/src/ab_sdk/events.py @@ -31,7 +31,7 @@ class PluginDisabled(Event): reason: str -# --- P5:系统事件 ------------------------------------------------------------- +# --- 系统事件 ------------------------------------------------------------- # # 以下事件由宿主经 ``NotificationManager.send_event`` 发出:先写入站内通知中心, # 再发布到事件总线(插件可 ``@subscribe(kind)``),最后推送到外部通知渠道。 @@ -377,7 +377,7 @@ class RenameSkippedEvent(SystemEvent): ) -# --- P4:organize 流水线事件(只发布到事件总线,不进通知中心) ------------------- +# --- organize 流水线事件(只发布到事件总线,不进通知中心) ------------------- # # 路径均为下载器视角的绝对路径:保存目录与种子内相对路径以 "/" 拼接 # (Windows 下载器的 "\" 也统一为 "/")。AutoBangumi 与下载器不在同一文件系统 diff --git a/backend/src/ab_sdk/points.py b/backend/src/ab_sdk/points.py index 2075b115..fc971a83 100644 --- a/backend/src/ab_sdk/points.py +++ b/backend/src/ab_sdk/points.py @@ -3,7 +3,7 @@ Provider 扩展点(``@provider``): - ``DOWNLOADER``:返回 :data:`ab_sdk.downloader.DownloaderFactory`,id 即 - ``downloader.type`` 的取值 + 下载器实例的 ``provider``(``plugins.instances[].provider``) - ``NOTIFIER``:返回 :data:`ab_sdk.notify.NotifierFactory`,id 即通知渠道的 ``type`` - ``LLM_PROVIDER``:返回 :class:`ab_sdk.llm.LLMProviderAdapter` 子类 @@ -26,14 +26,14 @@ LLM_PROVIDER = "llm_provider" SEARCH_SITE = "search_site" SCHEDULED_TASK = "scheduled_task" -# --- P3 ingest --- +# --- ingest --- METADATA_PROVIDER = "metadata_provider" TORRENT_FILTER = "torrent.filter" TITLE_PARSED = "title.parsed" TORRENT_ADDING = "torrent.adding" HTTP_REQUEST = "http.request" -# --- P5:外部接口与通知模板 --- +# --- 外部接口与通知模板 --- # # Provider 扩展点(id 只需在插件内唯一,宿主对外暴露时加插件 id 前缀): # @@ -55,7 +55,7 @@ MCP_TOOL = "mcp_tool" MCP_RESOURCE = "mcp_resource" MESSAGE_TEMPLATE = "message_template" -# --- P4 organize(契约见 :mod:`ab_sdk.rename`) --- +# --- organize(契约见 :mod:`ab_sdk.rename`) --- # # Provider 扩展点: # diff --git a/backend/src/module/plugin/bus.py b/backend/src/module/plugin/bus.py index c0513d2c..b7e926a4 100644 --- a/backend/src/module/plugin/bus.py +++ b/backend/src/module/plugin/bus.py @@ -150,7 +150,7 @@ class EventBus: sub.offer(event) async def drain(self) -> None: - """等待当前已入队的事件全部处理完(测试与关闭流程使用)。""" + """等待当前已入队的事件全部处理完(测试使用)。""" await asyncio.gather(*(sub.join() for sub in list(self._subscribers))) async def close_owner(self, owner: str) -> None: diff --git a/backend/src/module/plugins/builtin/hardlink/hardlink_plugin.py b/backend/src/module/plugins/builtin/hardlink/hardlink_plugin.py index 10aa449f..90471977 100644 --- a/backend/src/module/plugins/builtin/hardlink/hardlink_plugin.py +++ b/backend/src/module/plugins/builtin/hardlink/hardlink_plugin.py @@ -34,7 +34,7 @@ Status = Literal["linked", "exists", "conflict", "failed"] LINK_TIMEOUT = 3600.0 # ponytail: 补链按扩展名挑文件,与宿主 media_files 的 core 实现同一组;插件不能 -# import module.*,若用户换了 media_files 实现(P2.5 slots),这里需要改为经 SDK 查询 +# import module.*,若用户在 plugins.slots.media_files 换了实现,这里需要改为经 SDK 查询 BACKFILL_SUFFIXES = frozenset({".mp4", ".mkv", ".ass", ".srt"}) diff --git a/examples/plugins/manual-pick/README.md b/examples/plugins/manual-pick/README.md index f3e0cf2c..aecfdaa8 100644 --- a/examples/plugins/manual-pick/README.md +++ b/examples/plugins/manual-pick/README.md @@ -1,6 +1,6 @@ # 手动选种(示例插件) -P6 的验收演示:番剧详情页多一个「手动选种」标签,列出规则的种子,点「选用」记录选择。 +前端挂载点的演示:番剧详情页多一个「手动选种」标签,列出规则的种子,点「选用」记录选择。 用到的能力: