Skip to content

Commit 704b6c7

Browse files
authored
Merge pull request #280 from Gawain12/refactor-dev
Fix image-host workflows and improve tracker automation
2 parents 341b480 + 35d190f commit 704b6c7

58 files changed

Lines changed: 4006 additions & 657 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/dev-release.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232

3333
- name: Build
3434
run: npm run build
35+
env:
36+
AUTOFEED_USERSCRIPT_URL: https://github.com/Gawain12/auto_feed_js/releases/download/dev/auto_feed.user.js
3537

3638
- name: Update dev tag
3739
run: |

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060

6161
- name: Build
6262
run: npm run build
63+
env:
64+
AUTOFEED_USERSCRIPT_URL: https://github.com/Gawain12/auto_feed_js/releases/latest/download/auto_feed.user.js
6365

6466
- name: Create Release
6567
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ auto_feed.user.js
2222
dist/
2323

2424
# Local-only dev helpers (do not commit)
25-
scripts/dev-full.js
2625
scripts/generate-loader.js
2726
scripts/postbuild-copy.js
2827
scripts/verify-torrent-service.ts
@@ -33,3 +32,4 @@ legacy_extract/out/
3332
# Local reverse-engineering/reference material (keep local only)
3433
archive/
3534
legacy_extract/
35+
agent.md

‎AGENT.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- 非音乐站点:以可用和稳定为主,优先修回归。
1111
- 音乐站点(RED / OPS / DIC / OpenCD):继续按旧版规则补齐 parse/fill 与转发链路。
1212
- 新站适配:优先“源码对齐 + 实测验证”,而不是只拼 DOM 选择器。
13+
- 本地命令习惯: shell 命令统一通过 `rtk` 前缀执行。
1314

1415
## 代码组织(当前)
1516
- `src/trackers/*`:站点单独实现(站点差异优先放这里;一站一文件)
@@ -54,3 +55,7 @@
5455
- `npm run build` 通过。
5556
- 至少做 1 条源站 -> 目标站端到端验证(包含标题、简介、媒介字段、关键 ID、torrent 注入)。
5657
- 若改动站点逻辑,同步更新 `docs/wiki/FEATURE_PARITY.md` 状态说明。
58+
59+
## 近期进度
60+
- 2026-05-18:SC / HDT / TJUPT 完成第二轮稳定性修复。重点包括上传页等待选择器补齐、SC group-only 源页注入、HDT details/torrents 源页兼容、TJUPT 通用 name 与专用 ename/cname 填充分离,以及 Unit3D/Gazelle 统一使用 `targetTitle` 防止标题被通用逻辑覆盖。
61+
- 2026-05-19:修复旧设置未自动启用 SC / TJUPT / HDT 的迁移问题;PTP / SC 发布跳转按 legacy 先检索并附加 `groupid`;SC 目标页改为直接调用 `/imdb.php?code=` 填充 group 字段;HDT / TJUPT 源页增加稳定挂载点。

‎README.md‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- 自动预填标题、简介、媒体信息、图片等字段
2020
- IMDb -> 豆瓣 / PTGen 信息补全
2121
- 页面增强(PTP/HDB 等)与快速搜索入口
22-
- 图片转存与图床桥接(PTPIMG / Pixhost / Freeimage / Hostik / hdbimg)
22+
- 图片转存与图床桥接(PTPIMG / Pixhost / Freeimage / ImgBB / Hostik / hdbimg)
2323
- 远程推送(qBittorrent / Transmission / Deluge)
2424
- 种子清洗(Source/Announce/date/comment 等处理)
2525

@@ -57,12 +57,25 @@
5757
命令:
5858
```bash
5959
npm install
60-
npm run dev
6160
npm run build
6261
```
6362

64-
本地安装入口:
65-
- `http://127.0.0.1:5174/auto-feed.user.js`
63+
默认本地安装入口:
64+
- `file:///absolute/path/to/auto_feed_js/dist/auto-feed-refactor.user.js`
65+
66+
说明:
67+
- `npm run build` 会生成完整脚本 `dist/auto_feed.user.js` 和轻量 loader `dist/auto-feed-refactor.user.js`。
68+
- loader 的 `@require` 默认指向本机 `dist/auto_feed.user.js`,不依赖 `127.0.0.1:5174` 服务常驻。
69+
- loader 每次构建会追加本地构建版本号,打开本地入口时 Tampermonkey 会识别为 `Update`。
70+
- Chrome/Tampermonkey 使用 `file://` 脚本时,需要在扩展管理页给 Tampermonkey 开启“允许访问文件网址”。
71+
72+
需要临时热更新预览时,再启动本地服务:
73+
```bash
74+
npm run dev
75+
```
76+
77+
临时服务入口:
78+
- `http://127.0.0.1:5174/auto-feed-refactor.user.js`
6679

6780
后台常驻(screen):
6881
```bash

‎docs/wiki/Development.md‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,25 @@
77
## 命令
88
```bash
99
npm install
10-
npm run dev
1110
npm run build
1211
```
1312

14-
本地安装入口:
15-
- `http://127.0.0.1:5174/auto-feed.user.js`
13+
默认本地安装入口:
14+
- `file://<repo>/dist/auto-feed-refactor.user.js`
15+
16+
`npm run build` 会同时生成:
17+
- `dist/auto_feed.user.js`:完整脚本。
18+
- `dist/auto-feed-refactor.user.js`:轻量 loader,头部 `@require` 指向本机完整脚本。
19+
20+
默认开发安装不再依赖 `127.0.0.1:5174` 常驻服务。loader 每次构建会追加本地构建版本号,打开本地入口时 Tampermonkey 会识别为 `Update`。Chrome/Tampermonkey 使用 `file://` loader 时,需要在扩展管理页给 Tampermonkey 开启“允许访问文件网址”。
21+
22+
需要临时热更新预览时再启动:
23+
```bash
24+
npm run dev
25+
```
26+
27+
临时服务入口:
28+
- `http://127.0.0.1:5174/auto-feed-refactor.user.js`
1629

1730
## 架构约定
1831
- `trackers`:站点差异(parse/fill,一站一文件)

‎docs/wiki/FEATURE_PARITY.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Auto-Feed Refactor 功能对照表
22

3-
更新时间:2026-03-22
3+
更新时间:2026-05-18
44

55
本文档对照原版 Wiki(`auto_feed_js.wiki/支持的站点.md`)并同步当前重构进度:
66
- 标题 `✅` = 该模块核心能力已可用
@@ -89,12 +89,13 @@
8989
- ~~多图到 PIXhost(批量识别)~~
9090
- ~~拉取图像跳转上传(HDBits / imgbox / pixhost 等)~~
9191
- ~~截图提取与链接清洗~~
92-
- ✨ Hostik / hdbimg 桥接支持
92+
- ✨ HDB 保留原始 JPG 浏览体验,需要转存时再按 legacy 方式本地下载 PNG
93+
- ✨ Hostik / hdbimg 桥接支持(Hostik 根据原资源标题免点击创建/复用相册,完成上传后自动弹出结果)
9394

9495
### ✅ 信息增强
9596
- ~~IMDb -> 豆瓣基础获取~~
9697
- ~~PTGen 基础获取~~
97-
- ~~PTP / HDB 页面增强(评分、快搜入口)~~
98+
- ~~PTP / HDB 页面增强(评分、快搜入口,含 PTP 豆瓣延迟恢复)~~
9899

99100
### 🚧 缺失辅助功能
100101
- **部分站点中文信息覆盖**: **尚未全覆盖**。
@@ -181,7 +182,7 @@
181182
| HDRoute | http://hdroute.org/ | :heavy_check_mark: | :x: | ❌ | 未测试 | 不能说 |
182183
| HDSky | https://hdsky.me/ | :heavy_check_mark: | :heavy_check_mark: | ✅ | 已测试 | HDSky |
183184
| HDSpace | https://hd-space.org/ | :heavy_check_mark: | :x: | ❌ | 未测试 | 不是很了解 |
184-
| HDT | https://hd-torrents.org/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 核弹头,季考(已取消) |
185+
| HDT | https://hd-torrents.org/ | :heavy_check_mark: | :heavy_check_mark: | ⚠️ | 本地流程验证 | 核弹头,季考(已取消);已补独立 source/target tracker 与 details/torrents 源页兼容 |
185186
| HDTime | https://hdtime.org/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 高清时光 |
186187
| HDU | https://pt.hdupt.com/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 好多油 |
187188
| HDVideo | https://hdvideo.one/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 国内新站 |
@@ -235,11 +236,11 @@
235236
| ReelFlix | https://reelflix.xyz/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 外网影视站,unit3d |
236237
| RouSi | https://rousi.zip/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 无 |
237238
| RS | https://resource.xidian.edu.cn/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 西电教育站,外网不开 |
238-
| SC | https://secret-cinema.pw/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 小众电影外站,GZ架构 |
239+
| SC | https://secret-cinema.pw/ | :heavy_check_mark: | :heavy_check_mark: | ⚠️ | 本地流程验证 | 小众电影外站,GZ架构;已补 source/target tracker,支持 group-only 源页注入与 SC 上传字段 |
239240
| SoulVoice | https://pt.soulvoice.club/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 铃音 |
240241
| TCCF | https://et8.org/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 教育资源站 |
241242
| Tik | https://www.cinematik.net/ | :heavy_check_mark: | :heavy_check_mark: | ✅ | 已测试 | 题库,小众原盘站点,逼格站 |
242-
| TJUPT | https://www.tjupt.org/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 北洋,天大教育站 |
243+
| TJUPT | https://www.tjupt.org/ | :heavy_check_mark: | :heavy_check_mark: | ⚠️ | 本地流程验证 | 北洋,天大教育站;已补 source/target tracker,拆分通用 name 与专用 ename/cname 填充 |
243244
| TLFbits | http://pt.eastgame.org/ | :heavy_check_mark: | :heavy_check_mark: | ❌ | 未测试 | 吐鲁番,小体积 |
244245
| ~~TorrentDB~~ | ~~https://torrentdb.net/~~ | :x: | :heavy_check_mark: | ❌ | 未测试 | ~~已关站~~ |
245246
| TorrentLeech | https://www.torrentleech.org/ | :x: | :heavy_check_mark: | ❌ | 未测试 | 0day站,HR时间长 |

‎docs/wiki/Image-Tools.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
## 当前能力
44
- 简介图片提取与替换
55
- 缩略图 -> 原图链接转换(按常见图床规则)
6-
- 重传图床:PTPImg / Pixhost / Freeimage
6+
- 重传图床:PTPImg / Pixhost / Freeimage / ImgBB
77
- 图床桥接:hdbits / imgbox / pixhost / hdbimg / hostik
88

99
## 使用入口
1010
- 在转发嵌入区点击图床按钮。
11-
- 或在设置页填写图床 API Key(PTPImg / Freeimage)后使用重传。
11+
- 或在设置页填写图床 API Key(PTPImg / Freeimage / ImgBB)后使用重传。
1212

1313
## 行为说明
1414
- 优先使用你在页面中手工勾选/缓存过的截图。

‎docs/wiki/Settings.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
- 外部数据源:IMDb->豆瓣方式、PTGen 来源
1414
- 域名别名:CHD 域名、TorrentLeech 域名
1515
- 快搜模板编辑器(支持 legacy 模板行:`<a ...>` / `名称|URL` / 纯 URL)
16-
- 图床 API Key:PTPImg / Freeimage
16+
- 图床 API Key:PTPImg / Freeimage / ImgBB
1717
- `Sites`
1818
- 启用站点
1919
- 常用站点(收藏)
20-
- 列表页快搜开关(PTP/HDB/HDT/UHD)
20+
- 列表页快搜开关(PTP/HDB/HDT)
2121
- `Remote`
2222
- 远程侧边栏开关
2323
- 默认跳检、推送前确认

‎docs/wiki/Site-Support.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Unit3D/Classic:BHD、BLU、Tik、KG、Monika
99

1010
补充:Monika(MDU)已按上游源码规则对齐修复上传路径与关键表单映射。
11+
补充:SC、TJUPT、HDT 已补齐为可识别源站/目标站,并按 legacy 规则加入专属 tracker;HDT 归入 special 站点清单,避免误放进 Nexus/Gazelle/Unit3D 分类。2026-05-18 回归修复了三站上传页表单等待、SC group-only 源页注入、HDT details/torrents 源页兼容、TJUPT 专用字段与通用标题抢写等问题。
1112

1213
## 音乐站点(持续补齐)
1314
- RED
@@ -23,6 +24,10 @@
2324
- HDF
2425
- PrivateHD
2526

27+
## 本地构建验证
28+
- 图床按钮已从 Gifyu 切换为 ImgBB,旧 `gifyuApiKey` 会迁移到 `imgbbApiKey`。
29+
- Cinematik 的 IMDb aspect ratio 兜底已按当前 IMDb technical 页 DOM 验证,可读取 `Aspect ratio1.85 : 1` 形态。
30+
2631
## 代码位置
2732
- 站点配置:`src/config/`
2833
- 站点逻辑:`src/trackers/`(一站一文件)

0 commit comments

Comments
 (0)