dsh-movie-workbench 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -3
- package/README.zh.md +15 -1
- package/client.js +1009 -3
- package/index.js +30 -1
- package/lib/host.js +748 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,6 +34,18 @@ DSH **Movies workbench** : Search for movies and TV series from **TMDB**, **IMDb
|
|
|
34
34
|
the same detail request.
|
|
35
35
|
- **BT resources** — search BT resources, sortable by size, seeders or downloads, with paged
|
|
36
36
|
loading (scroll or 加载更多 for the next page); copy the magnet link or open the source page.
|
|
37
|
+
- **AI resource pick** — click AI 选资源 above the BT list to open the dialog; evaluation only
|
|
38
|
+
starts when you press 开始评估. Pick a preference profile first: quality (best / balanced /
|
|
39
|
+
small size), language and subtitles, and the prompt will honour it when ranking. Switch to
|
|
40
|
+
自由模式 at the top right of the dialog to see and edit the exact prompt sent to the model
|
|
41
|
+
(the simple-mode choices are already mapped into it) and to inspect the model's raw output;
|
|
42
|
+
the required JSON answer format stays in the system prompt and is not editable. The dialog
|
|
43
|
+
footer shows the model in use and lets you switch it right there (defaults to the model set
|
|
44
|
+
in settings). The Host asks the model configured for this DSH profile (through the DSH LLM
|
|
45
|
+
service) to compare seeders, size, release quality and index reliability; a different model
|
|
46
|
+
can be chosen in the settings popover. The picked row is highlighted with an AI 推荐 badge
|
|
47
|
+
and the reason sits in a banner above the list. The answer is cached for the current title,
|
|
48
|
+
so reopening the dialog shows the previous result (and offers 重新评估).
|
|
37
49
|
|
|
38
50
|
## Installation
|
|
39
51
|
|
|
@@ -60,9 +72,14 @@ A Git URL also works:
|
|
|
60
72
|
|
|
61
73
|
## Data-source settings
|
|
62
74
|
|
|
63
|
-
The gear button next to the TMDB Key button in the page header opens the
|
|
64
|
-
|
|
65
|
-
enabled, and when only one is left the filter row collapses to that channel.
|
|
75
|
+
The gear button next to the TMDB Key button in the page header opens the settings popover. The
|
|
76
|
+
data-source switches are stored in `localStorage` (`dsh-movie-workbench.sources`); at least one
|
|
77
|
+
channel must stay enabled, and when only one is left the filter row collapses to that channel.
|
|
78
|
+
|
|
79
|
+
The same popover lists the models advertised by the profile's LLM providers (from the Host's
|
|
80
|
+
`GET /models`) and lets you pick the one used by AI 选资源; the choice lives in
|
|
81
|
+
`localStorage` (`dsh-movie-workbench.ai-model`), and 「跟随默认」 keeps following the profile
|
|
82
|
+
model. Models are only available when the DSH LLM service and a model are configured.
|
|
66
83
|
|
|
67
84
|
## Host API
|
|
68
85
|
|
|
@@ -81,6 +98,8 @@ The Host side (`index.js` + `lib/`) exposes a single prefix route, `/movie-workb
|
|
|
81
98
|
| `GET /series?source=imdb&id=` | the IMDb connection chain of one title (follows / followed by / spin-off), ordered by release year |
|
|
82
99
|
| `GET /chart?source=douban&id=collection:<id>` | one of the official charts a DouBan title is listed in, with the same ranked envelope as other charts |
|
|
83
100
|
| `GET /torrents?q=&alt=&source=&limit=&page=` | BT resource search; one page of results (`page` 1–20) plus `hasMore` for scroll loading |
|
|
101
|
+
| `GET /models` | models advertised by the profile's LLM providers, plus the current profile selection |
|
|
102
|
+
| `POST /pick` | ask the Host's AI model to choose the best of up to 30 BT rows; body `{ item, rows, lang, preferences?, prompt?, preview?, model? }` (`preferences` = `{ quality, language, subtitle }`, `prompt` overrides the generated prompt, `preview: true` returns the prompt without calling a model), returns `pick` (`{id, rank, reason}`), `picks`, `prompt`, `preferences` and `errors` (`llm_unavailable` / `llm_no_model` / `bad_preferences` / `bad_prompt` / timeout) |
|
|
84
103
|
| `GET /image?url=` | proxy posters from allowlisted image hosts |
|
|
85
104
|
|
|
86
105
|
All upstream HTTP requests happen in the Host, so the page stays same-origin and DouBan's `Referer`
|
package/README.zh.md
CHANGED
|
@@ -26,6 +26,14 @@ DSH **影视工作台**:在一个页面里检索 **TMDB**、**IMDb** 和 **豆
|
|
|
26
26
|
(推荐数据不带年份)会用同一次详情请求补上发行年份。
|
|
27
27
|
- **BT 资源** — 查找 BT 资源,可按大小、做种、下载排序,支持下滑/「加载更多」分页;
|
|
28
28
|
可复制磁力链接或打开来源页。
|
|
29
|
+
- **AI 选资源** — 点击 BT 列表上方的「AI 选资源」会打开对话框,但只有按下「开始评估」才会
|
|
30
|
+
调用模型;评估前可先选偏好:画质(最高画质 / 均衡 / 小体积)、语言与字幕,提示词会按偏好
|
|
31
|
+
加权。对话框右上角可切换「简单模式 / 自由模式」,自由模式下简单模式选好的偏好已映射进
|
|
32
|
+
提示词,可直接查看并编辑,同时查看模型的原始输出;要求的 JSON 输出格式放在系统提示词里,
|
|
33
|
+
不可编辑。对话框底部会显示当前模型,也可以直接在那里切换(默认跟随设置里的模型)。Host
|
|
34
|
+
调用当前 DSH Profile 配置的模型(经由 DSH LLM 服务)综合做种、大小、片源质量与索引可靠性
|
|
35
|
+
挑出最佳资源;也可在设置里另选模型。被选中的行会高亮并显示「AI 推荐」徽标,列表上方展示推荐
|
|
36
|
+
理由。结果按当前条目缓存,再次打开对话框会直接展示上次结果,并支持「重新评估」。
|
|
29
37
|
|
|
30
38
|
## 安装
|
|
31
39
|
|
|
@@ -51,9 +59,13 @@ git+https://github.com/aidc-lab/dsh-movie-workbench.git`。
|
|
|
51
59
|
|
|
52
60
|
## 数据源设置
|
|
53
61
|
|
|
54
|
-
页头 TMDB Key
|
|
62
|
+
页头 TMDB Key 按钮旁的齿轮按钮打开设置弹层。数据源开关保存在 `localStorage`
|
|
55
63
|
(`dsh-movie-workbench.sources`);至少保留一个渠道,只剩一个时筛选行收起到该渠道。
|
|
56
64
|
|
|
65
|
+
同一个弹层会列出 Profile 的 LLM 提供商所提供的模型(来自 Host 的 `GET /models`),可指定
|
|
66
|
+
「AI 选资源」使用的模型;选择保存在 `localStorage`(`dsh-movie-workbench.ai-model`),
|
|
67
|
+
「跟随默认」则始终跟随 Profile 当前模型。只有配置了 DSH LLM 服务与模型时才可用。
|
|
68
|
+
|
|
57
69
|
## Host API
|
|
58
70
|
|
|
59
71
|
Host 端(`index.js` + `lib/`)只有一个前缀路由 `/movie-workbench/api`:
|
|
@@ -71,6 +83,8 @@ Host 端(`index.js` + `lib/`)只有一个前缀路由 `/movie-workbench/api`
|
|
|
71
83
|
| `GET /series?source=imdb&id=` | 单个 IMDb 条目的相关系列(前作 / 续作 / 衍生),按上映年份排序 |
|
|
72
84
|
| `GET /chart?source=douban&id=collection:<id>` | 豆瓣条目收录的某个官方榜单,返回结构与其他榜单一致 |
|
|
73
85
|
| `GET /torrents?q=&alt=&source=&limit=&page=` | BT 资源搜索;返回一页结果(`page` 1–20)及 `hasMore` 供下滑加载 |
|
|
86
|
+
| `GET /models` | Profile 的 LLM 提供商所提供的模型,以及当前 Profile 选中的模型 |
|
|
87
|
+
| `POST /pick` | 让 Host 端 AI 模型从最多 30 条 BT 资源中挑选最佳;请求体 `{ item, rows, lang, preferences?, prompt?, preview?, model? }`(`preferences` 为 `{ quality, language, subtitle }`,`prompt` 覆盖默认提示词,`preview: true` 只返回提示词不调用模型),返回 `pick`(`{id, rank, reason}`)、`picks`、`prompt`、`preferences` 与 `errors`(`llm_unavailable` / `llm_no_model` / `bad_preferences` / `bad_prompt` / 超时等) |
|
|
74
88
|
| `GET /image?url=` | 代理白名单图床的海报 |
|
|
75
89
|
|
|
76
90
|
所有上游 HTTP 请求都在 Host 完成,因此页面保持同源,豆瓣的 `Referer` 要求也在服务端
|