Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ecfb57d
chore: 忽略本地调研目录 .research-flood/.research-iyuu
Rhilip Sep 13, 2026
2cc347e
feat(iyuu): P0 纯函数模块——IYUU 站点映射 + 双路线下载解析
Rhilip Sep 13, 2026
666e57a
feat(iyuu): P0 后半——offscreen 中心封装 + 设置页「IYUU 辅种」窗口
Rhilip Sep 13, 2026
8c2d8ce
refactor(iyuu): IIyuuStorageSchema 并入 metadata storage
Rhilip Sep 13, 2026
731d06b
feat(iyuu): P1 辅种候选解析与批量扫描(keep-upload 批量扫描 + 下载器详情查其他站辅种)
Rhilip Sep 13, 2026
05b30fa
refactor(iyuu): 提取 IYUU 批量扫描对话框为独立 ScanDialog 组件
Rhilip Sep 13, 2026
500f52e
refactor(iyuu): 提取 IYUU 查其他站辅种对话框为独立 ReseedDialog 组件
Rhilip Sep 13, 2026
0292e96
feat(iyuu): MyClient 列表勾选种子后 IYUU 批量扫描(ReseedBatchDialog 按来源下载器注入)
Rhilip Sep 13, 2026
7021807
fix(iyuu): 修正 i18n 键路径——IyuuWindow 改用 SetBase.iyuu.*,批量扫描改用 KeepUploa…
Rhilip Sep 13, 2026
2c62995
fix(keep-upload-task): 工具栏按钮改用 NavButton 统一 v3 排版规格(字体 14px/500/upper…
Rhilip Sep 13, 2026
7e2ac34
fix(iyuu): iyuuResolveHits 的 sources 改传 Record——Map 经消息序列化退化为普通对象导致 .…
Rhilip Sep 13, 2026
98205d9
fix(iyuu): 查询批次无命中(未查询到可辅种数据)按空结果处理,不中断整批扫描
Rhilip Sep 13, 2026
ec7bb64
feat(iyuu): 设置页站点表全量展示+复选框勾选自动保存,「保存并汇报」一步获取 sid_sha1
Rhilip Sep 13, 2026
0b8fc21
docs(iyuu): IYUU token 随 metadata 备份导出——更正 tokenHint 与注释表述(备份范围确认)
Rhilip Sep 13, 2026
6ebc9c9
fix(iyuu): 已持有站点表 favicon 加 max-width/height 硬约束,站点名文本截断防撑宽
Rhilip Sep 13, 2026
d6c3766
i18n(iyuu): 已持有站点表头「站点」改为「IYUU 站点」
Rhilip Sep 13, 2026
c0d86c4
style(iyuu): sid_sha1 展示移到按钮行同一水平(表格上方右侧)
Rhilip Sep 13, 2026
7e4bd3e
i18n(iyuu): 已持有站点表头「归属」改为「插件映射站点」
Rhilip Sep 13, 2026
a0784c5
feat(crossSeed): 统一辅种命中源抽象包——IYUU 中心/NexusPHP pieces-hash 直查/本地文件树对比三源整合
Rhilip Sep 13, 2026
24318f4
feat(settings): 设置页新增「辅种」tab(下载与用户信息之间),IYUU 配置并入;全局 reseed config 控制…
Rhilip Sep 13, 2026
f61f6e8
feat(crossSeed): 按 cross-seed 决策模型增强 LocalCrossSeed——站内搜索+snatch 候选种子…
Rhilip Sep 13, 2026
a85a8db
feat(reseed): IYUU 批量扫描优化——懒加载下载链接 + 多选修复 + 一键推送辅种
Rhilip Sep 13, 2026
246d2cf
refactor(crossSeed): @ptd/iyuu 并入 @ptd/crossSeed,统一辅种抽象包
Rhilip Sep 13, 2026
fd547b7
feat(iyuu): NexusPHP 直查设置默认仅显示 NexusPHP schema 站点 + 接口地址默认拼接
Rhilip Sep 14, 2026
a5d968b
feat(iyuu): 额外站点改独立 Dialog 添加——选择站点+接口/passkey,保存时验证接口存在(非 404)
Rhilip Sep 14, 2026
568666c
i18n(iyuu): LocalCrossSeed 卡空态改用专属词条,移除误用的 IYUU 拉取站点表提示
Rhilip Sep 14, 2026
300ac0d
feat(reseed): 辅种设置页卡片重排 + 三源独立开关
Rhilip Sep 14, 2026
273fada
refactor(reseed): IyuuWindow 重命名为 IyuuCard(其为卡片集合而非完整 window)
Rhilip Sep 14, 2026
a8e5380
feat(reseed): MyClient 扫描结果表增加批量全选,勾选行为改为显式赋值
Rhilip Sep 14, 2026
c4389dd
feat(reseed): 辅种方案开关控制对应配置卡显隐
Rhilip Sep 14, 2026
19e2871
i18n(iyuu): LocalCrossSeed 空态提示改中性文案,移除指向「站点」页的说明
Rhilip Sep 14, 2026
0ef33fc
feat(iyuu): NexusPHP 直查 passkey 为空时不允许启用该站
Rhilip Sep 14, 2026
40250dd
feat(iyuu): 已持有站点未拉取站点表时默认展示已保存的 heldSites(chips 可删减)
Rhilip Sep 14, 2026
d1d2f01
feat(reseed): 辅种任务批量扫描切换到多源聚合消息 + 候选来源徽标
Rhilip Sep 14, 2026
ecf5361
feat(reseed): MyClient 批量/详情扫描切换到跨下载器多源聚合(crossSeedScanTorrents)
Rhilip Sep 14, 2026
6b29d52
feat(reseed): cross-seed 可选件落地——decision 持久化去重 + partial 差量补信息
Rhilip Sep 14, 2026
0476171
i18n(reseed): 批量扫描改名「批量辅种扫描」,去 IYUU 限定(扫描已多源化)
Rhilip Sep 14, 2026
d57f0c2
fix(site): hdsky 懒加载下载链接走基类详情页提取(避免缺 passkey/sign)+ IYUU dmhy 映射修正为 u2
Rhilip Sep 14, 2026
ce182d6
fix(downloader): Transmission torrent-add 返回 torrent-duplicate 视为成功,跳…
Rhilip Sep 14, 2026
afb5b29
refactor(site): 合并 NexusPHP.getTorrentDownloadLink 的详情页提取与裸拼逻辑为单一生成路径
Rhilip Sep 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ node_modules

# 本地调研/设计文档(不入库)
docs
.research-flood
.research-iyuu

## Build files
dist
Expand Down
13 changes: 13 additions & 0 deletions src/entries/background/utils/nativeMessaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ const ALLOWED_METHODS = new Set([
"updateKeepUploadTask",
"deleteKeepUploadTask",
"clearKeepUploadTasks",
// IYUU reseed center
"getIyuusConfig",
"setIyuusConfig",
"iyuuFetchSites",
"iyuuReportExisting",
"iyuuQueryReseed",
"iyuuDeriveHeldSites",
"iyuuResolveHits",
"iyuuScanForReseed",
"crossSeedScanForReseed",
"crossSeedScanTorrents",
"nexusValidateApi",
"reseedDecisionRecord",
]);

// ── Module-scoped state ──────────────────────────────────────────────
Expand Down
47 changes: 47 additions & 0 deletions src/entries/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import type {
TorrentQueueDirection,
TorrentSpeedLimit,
} from "@ptd/downloader";
import type { IYUUReseedHit, ICrossSeedCandidate } from "@ptd/crossSeed";

// 可序列化的种子信息,用于辅种检测
export interface ITorrentInfoForVerification {
Expand Down Expand Up @@ -56,6 +57,8 @@ import {
IKeepUploadTask,
TKeepUploadTaskKey,
BridgeStatus,
IIyuuStorageSchema,
IIyuuSiteCacheEntry,
} from "@/shared/types.ts";

import { isDebug } from "~/helper.ts";
Expand Down Expand Up @@ -196,6 +199,50 @@ interface ProtocolMap extends TMessageMap {
deleteKeepUploadTask(taskId: TKeepUploadTaskKey): void;
clearKeepUploadTasks(): void;

// 2.8 IYUU 辅种中心 ( utils/iyuu )
getIyuusConfig(): IIyuuStorageSchema | undefined;
setIyuusConfig(data: Partial<IIyuuStorageSchema>): void;
/** 拉取并缓存 IYUU 站点表(TTL 24h) */
iyuuFetchSites(): IIyuuSiteCacheEntry[];
/** 汇报已持有站点,返回 sid_sha1(写入缓存,7 天有效) */
iyuuReportExisting(sidList: number[]): string;
/** 查询辅种:给定本地 infohash 列表,返回各站命中 */
iyuuQueryReseed(hashes: string[]): Record<string, { torrent: IYUUReseedHit[] }>;
/** 从本地已配置站点自动推导持有站点(本地 id → IYUU sid) */
iyuuDeriveHeldSites(): { localIds: TSiteID[]; sidList: number[]; unmatched: TSiteID[] };
/** 批量把 IYUU 查询命中解析为辅种候选(B 路线优先,A 兜底;不可注入项标 error) */
iyuuResolveHits(data: {
hits: Array<{ sid: number; torrent_id: number; info_hash?: string }>;
sources?: Record<string, { name: string; savePath: string; size: number }>;
}): ICrossSeedCandidate[];
/** 批量辅种扫描:下载器已完成种子 hash 分批查 IYUU 并解析候选 */
iyuuScanForReseed(downloaderId: string): ICrossSeedCandidate[];
/** 多源聚合扫描(crossSeed):IYUU 中心 + NexusPHP pieces-hash 直查 + 本地文件树对比 */
crossSeedScanForReseed(data: {
downloaderId: string;
options?: {
enableIyuus?: boolean;
enableNexus?: boolean;
enableLocal?: boolean;
/** 仅扫描指定 infohash 子集 */
hashes?: string[];
};
}): ICrossSeedCandidate[];
/** 多源聚合扫描(指定种子集合,可跨下载器;MyClient 勾选/详情单查) */
crossSeedScanTorrents(data: {
torrents: Array<{ clientId: string; infoHash: string; name: string; savePath: string; totalSize: number }>;
options?: { enableIyuus?: boolean; enableNexus?: boolean; enableLocal?: boolean };
}): ICrossSeedCandidate[];
/** 验证 NexusPHP pieces-hash 接口是否存在(非 HTTP 404 即视为可达) */
nexusValidateApi(data: { apiUrl: string; passkey?: string }): { ok: boolean; status?: number; error?: string };
/** 记录候选已推送(decision 持久化,跨扫描去重) */
reseedDecisionRecord(data: {
siteId: string;
torrentId: number;
infoHash?: string;
decision?: "injected" | "matched";
}): boolean;

// 2.8 Lightweight list queries (for CLI discovery)
getSiteList(): Array<{ id: string; name: string; url: string; offline: boolean }>;
getDownloaderList(): Array<{ id: string; name: string; type: string; enabled: boolean; address: string }>;
Expand Down
5 changes: 4 additions & 1 deletion src/entries/offscreen/adapter/indexdb.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { openDB, type IDBPDatabase } from "idb";
import { IPtdDBSchemaV1, IPtdDBSchema, IPtdDBSchemaV2 } from "@/shared/types.ts";

export const ptdIndexDb = openDB<IPtdDBSchema>("ptd", 3, {
export const ptdIndexDb = openDB<IPtdDBSchema>("ptd", 4, {
upgrade(db, oldVersion) {
if (oldVersion < 1) {
const dbV1 = db as unknown as IDBPDatabase<IPtdDBSchemaV1>;
Expand All @@ -14,5 +14,8 @@ export const ptdIndexDb = openDB<IPtdDBSchema>("ptd", 3, {
if (oldVersion < 3) {
db.createObjectStore("favicon");
}
if (oldVersion < 4) {
db.createObjectStore("reseed_decision", { keyPath: "key" });
}
},
});
2 changes: 2 additions & 0 deletions src/entries/offscreen/offscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ import "./utils/backup.ts";
import "./utils/socialInformation.ts";
import "./utils/socialRecommendations.ts";
import "./utils/keepUploadTask.ts";
import "./utils/iyuu.ts";
import "./utils/crossSeed.ts";
Loading
Loading