dsh-movie-workbench 1.6.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 CHANGED
@@ -10,7 +10,7 @@ DSH **Movies workbench** : Search for movies and TV series from **TMDB**, **IMDb
10
10
  ## Features
11
11
 
12
12
  - **Film & TV search** — results grouped by channel, with posters, years, ratings and source links.
13
- - **Trending** — each channel's popular movies and TV series on the home page; the row length follows the panel width so every channel fills exactly two rows, and it re-requests on resize.
13
+ - **Trending** — each channel's popular movies and TV series on the home page; the row length follows the panel width so every channel fills exactly two rows, and it re-requests on resize. DouBan rows come from the mobile recommendation feed, so each card shows its release year next to the type.
14
14
  - **Channel browse** — open any channel for its own page with category tabs (TMDB: This week /
15
15
  Movies / TV; IMDb: Featured / Movies / TV; DouBan: Popular / Movies / TV / Movie charts /
16
16
  TV charts) and infinite scroll for the next pages.
@@ -20,8 +20,32 @@ DSH **Movies workbench** : Search for movies and TV series from **TMDB**, **IMDb
20
20
  each genre; TV lists group 官方榜单, 年度榜单 and 高分经典 / 近期热门 for the same genres.
21
21
  Generated charts use their first title's poster as the card cover. Open a chart to see the
22
22
  ranked titles with the same paged infinite scroll.
23
+ - **Related sections on the detail page** — TMDB collections, IMDb related titles and
24
+ DouBan charts sit in a right-hand rail on the title page as the same compact card:
25
+ a cover, a name and a small meta line. A TMDB collection opens the collection page;
26
+ an IMDb 相关系列 card opens the related-series page in release order; each DouBan
27
+ 收录于榜单 card opens that chart's ranked titles directly. The middle column and the
28
+ synopsis use the full remaining width, and the rail stacks below the title on narrow
29
+ panels.
30
+ - **Detail metadata** — the title page shows country/region, genres and runtime as small
31
+ tags under the rating row: DouBan details come from the subject API, TMDB details from
32
+ the movie endpoint, and IMDb details from its browser GraphQL endpoint. A DouBan title
33
+ opened from a recommendation row (which carries no year) fills its release year from
34
+ the same detail request.
23
35
  - **BT resources** — search BT resources, sortable by size, seeders or downloads, with paged
24
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 重新评估).
25
49
 
26
50
  ## Installation
27
51
 
@@ -48,9 +72,14 @@ A Git URL also works:
48
72
 
49
73
  ## Data-source settings
50
74
 
51
- The gear button next to the TMDB Key button in the page header opens the data-source switches. The
52
- choice is stored in `localStorage` (`dsh-movie-workbench.sources`); at least one channel must stay
53
- 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.
54
83
 
55
84
  ## Host API
56
85
 
@@ -64,8 +93,13 @@ The Host side (`index.js` + `lib/`) exposes a single prefix route, `/movie-workb
64
93
  | `GET /browse?source=&category=&page=&cursor=&lang=` | one page (20 items) of a channel browse category; returns `hasMore` and, for IMDb, an opaque `next` cursor for infinite scroll |
65
94
  | `GET /charts?source=douban&kind=movie\|tv` | one chart catalog: `movie` (default) has 3 official charts with live metadata, 10 annual charts (高分/热门 for 2025–2021), 27 hidden-gem charts (one per genre) and 54 genre charts (94 total); `tv` has 3 official, 10 annual and 54 genre charts (67 total, no hidden gems) |
66
95
  | `GET /chart?source=douban&id=&start=&count=` | one page of a chart's ranked titles; `id` is an official id, `year:<yyyy>:<S or U>`, `hidden:<genre>`, `genre:<genre>:<S or U>`, or the TV forms `tv-year:<yyyy>:<S or U>` / `tv-genre:<genre>:<S or U>` (S = high-score, U = recent hits) |
67
- | `GET /detail?source=douban&id=` | synopsis and metadata for a DouBan title |
96
+ | `GET /detail?source=douban\|tmdb\|imdb&id=` | synopsis and metadata (country/region, genres, runtime) for a DouBan title, the collection reference of a TMDB movie, or an IMDb title's metadata |
97
+ | `GET /collection?source=tmdb&id=` | every part of a TMDB collection, as normalized movie results |
98
+ | `GET /series?source=imdb&id=` | the IMDb connection chain of one title (follows / followed by / spin-off), ordered by release year |
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 |
68
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) |
69
103
  | `GET /image?url=` | proxy posters from allowlisted image hosts |
70
104
 
71
105
  All upstream HTTP requests happen in the Host, so the page stays same-origin and DouBan's `Referer`
@@ -91,6 +125,9 @@ panel (stored only in the local browser). IMDb and DouBan need no key.
91
125
  `bitsearch.to` and the poster image hosts.
92
126
  - IMDb search results carry no rating; DouBan recommendations include the public `rate`; TMDB
93
127
  provides ratings and vote counts.
128
+ - IMDb related titles come from IMDb's browser GraphQL `connections` field (up to 1,250
129
+ relations per title); DouBan ranking chips come from `subject_collections` in the
130
+ subject payload.
94
131
  - Channel browse pages return 20 items per page and stop at page 100. IMDb browse pages are
95
132
  cursor paged through IMDb's browser GraphQL popularity index, so scrolling keeps loading new
96
133
  titles; the home Trending row still uses a curated seed list, which is why it is limited.
package/README.zh.md CHANGED
@@ -10,15 +10,30 @@ DSH **影视工作台**:在一个页面里检索 **TMDB**、**IMDb** 和 **豆
10
10
  ## 功能
11
11
 
12
12
  - **影视搜索** — 结果按渠道分组,含海报、年份、评分与来源链接。
13
- - **热门推荐** — 首页展示各渠道热门推荐影视;每行数量随面板宽度自适应,正好铺满两行,窗口尺寸变化时自动重新请求。
13
+ - **热门推荐** — 首页展示各渠道热门推荐影视;每行数量随面板宽度自适应,正好铺满两行,窗口尺寸变化时自动重新请求。豆瓣推荐数据来自移动端推荐接口,卡片与其它渠道一样显示年份。
14
14
  - **渠道浏览** — 点进渠道进入独立页面,按分类标签切换(TMDB:本周趋势 / 电影 / 剧集;
15
15
  IMDb:精选作品 / 电影 / 剧集;豆瓣:热门推荐 / 电影 / 剧集 / 电影榜单 / 剧集榜单),下滑自动加载下一页。
16
16
  - **豆瓣榜单** — 豆瓣渠道页有「电影榜单」和「剧集榜单」两个标签,分组均可折叠。电影榜单包含
17
17
  官方榜单、年度榜单(2025–2021,含高分/热门两档)、高分经典(27 个类型)、近期热门(27 个类型)和
18
18
  冷门佳作(27 个类型);剧集榜单包含官方榜单、年度榜单和高分经典 / 近期热门。
19
19
  无封面的榜单自动取第一名作品的封面,点开榜单按排名展示影片,同样支持下滑加载更多。
20
+ - **详情页的相关卡片** — TMDB 合集、IMDb 相关系列、豆瓣收录于榜单统一放在详情页右侧栏,
21
+ 显示为同一款紧凑卡片(封面 + 名称 + 一行说明):TMDB 合集进入合集页,IMDb 相关系列
22
+ 按上映年份浏览全部相关作品,豆瓣的每个榜单卡片直接打开该榜单的排名影片。中间正文与简介
23
+ 占满剩余宽度,面板较窄时右侧栏自动落到正文下方。
24
+ - **详情元数据** — 详情页在评分标签下以小型标签展示国家/地区、分类与片长:豆瓣来自条目
25
+ 接口,TMDB 来自电影详情接口,IMDb 来自其浏览器 GraphQL 接口;从推荐行进入的豆瓣条目
26
+ (推荐数据不带年份)会用同一次详情请求补上发行年份。
20
27
  - **BT 资源** — 查找 BT 资源,可按大小、做种、下载排序,支持下滑/「加载更多」分页;
21
28
  可复制磁力链接或打开来源页。
29
+ - **AI 选资源** — 点击 BT 列表上方的「AI 选资源」会打开对话框,但只有按下「开始评估」才会
30
+ 调用模型;评估前可先选偏好:画质(最高画质 / 均衡 / 小体积)、语言与字幕,提示词会按偏好
31
+ 加权。对话框右上角可切换「简单模式 / 自由模式」,自由模式下简单模式选好的偏好已映射进
32
+ 提示词,可直接查看并编辑,同时查看模型的原始输出;要求的 JSON 输出格式放在系统提示词里,
33
+ 不可编辑。对话框底部会显示当前模型,也可以直接在那里切换(默认跟随设置里的模型)。Host
34
+ 调用当前 DSH Profile 配置的模型(经由 DSH LLM 服务)综合做种、大小、片源质量与索引可靠性
35
+ 挑出最佳资源;也可在设置里另选模型。被选中的行会高亮并显示「AI 推荐」徽标,列表上方展示推荐
36
+ 理由。结果按当前条目缓存,再次打开对话框会直接展示上次结果,并支持「重新评估」。
22
37
 
23
38
  ## 安装
24
39
 
@@ -44,9 +59,13 @@ git+https://github.com/aidc-lab/dsh-movie-workbench.git`。
44
59
 
45
60
  ## 数据源设置
46
61
 
47
- 页头 TMDB Key 按钮旁的齿轮按钮打开数据源开关。选择保存在 `localStorage`
62
+ 页头 TMDB Key 按钮旁的齿轮按钮打开设置弹层。数据源开关保存在 `localStorage`
48
63
  (`dsh-movie-workbench.sources`);至少保留一个渠道,只剩一个时筛选行收起到该渠道。
49
64
 
65
+ 同一个弹层会列出 Profile 的 LLM 提供商所提供的模型(来自 Host 的 `GET /models`),可指定
66
+ 「AI 选资源」使用的模型;选择保存在 `localStorage`(`dsh-movie-workbench.ai-model`),
67
+ 「跟随默认」则始终跟随 Profile 当前模型。只有配置了 DSH LLM 服务与模型时才可用。
68
+
50
69
  ## Host API
51
70
 
52
71
  Host 端(`index.js` + `lib/`)只有一个前缀路由 `/movie-workbench/api`:
@@ -59,8 +78,13 @@ Host 端(`index.js` + `lib/`)只有一个前缀路由 `/movie-workbench/api`
59
78
  | `GET /browse?source=&category=&page=&cursor=&lang=` | 渠道浏览分类的一页(20 条),返回 `hasMore` 与 IMDb 的不透明 `next` 游标用于无限加载 |
60
79
  | `GET /charts?source=douban&kind=movie\|tv` | 单个榜单目录:`movie`(默认)含 3 个官方榜单(实时元数据)+ 10 个年度榜单(2025–2021 的高分/热门)+ 27 个类型冷门佳作 + 54 个分类题材榜单(共 94 个);`tv` 含 3 个官方 + 10 个年度 + 54 个分类题材榜单(共 67 个,无冷门佳作) |
61
80
  | `GET /chart?source=douban&id=&start=&count=` | 某个榜单的一页按排名条目;`id` 为官方榜单 id、`year:<年份>:<S 或 U>`、`hidden:<类型>`、`genre:<类型>:<S 或 U>`,以及剧集形式 `tv-year:<年份>:<S 或 U>` / `tv-genre:<类型>:<S 或 U>`(S 高分经典,U 近期热门) |
62
- | `GET /detail?source=douban&id=` | 豆瓣条目的简介与元数据 |
81
+ | `GET /detail?source=douban\|tmdb\|imdb&id=` | 豆瓣条目的简介与元数据(国家/地区、分类、片长),或 TMDB 电影所属的合集信息,或 IMDb 条目的元数据 |
82
+ | `GET /collection?source=tmdb&id=` | TMDB 合集里的全部作品(归一化电影结果) |
83
+ | `GET /series?source=imdb&id=` | 单个 IMDb 条目的相关系列(前作 / 续作 / 衍生),按上映年份排序 |
84
+ | `GET /chart?source=douban&id=collection:<id>` | 豆瓣条目收录的某个官方榜单,返回结构与其他榜单一致 |
63
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` / 超时等) |
64
88
  | `GET /image?url=` | 代理白名单图床的海报 |
65
89
 
66
90
  所有上游 HTTP 请求都在 Host 完成,因此页面保持同源,豆瓣的 `Referer` 要求也在服务端
@@ -86,7 +110,9 @@ TMDB 需要凭据:可设置 `tmdbApiKey`,或在面板的 Key 控件里粘贴
86
110
  `api.themoviedb.org`、`v2.sg.media-imdb.com`、`movie.douban.com`、`bt4gprx.com`、
87
111
  `bitsearch.to` 及海报图床。
88
112
  - IMDb 搜索结果没有评分;豆瓣推荐带公开的 `rate`;TMDB 提供评分与票数。
89
- - 渠道浏览每页 20 条、最多 10 页;IMDb 浏览页基于精选种子列表经 suggestion API 解析,
113
+ - IMDb 相关系列来自 IMDb 浏览器 GraphQL 的 `connections` 字段(单个条目最多 1250 条关系);
114
+ 豆瓣收录于榜单来自条目详情里的 `subject_collections` 字段。
115
+ - 渠道浏览每页 20 条、最多 100 页;IMDb 浏览页基于精选种子列表经 suggestion API 解析,
90
116
  因此一页可能不足 20 条。
91
117
  - suggestion、rexxar、BT4G 与 BitSearch 都是未公开接口,可能变更或限流;失败时按渠道
92
118
  单独提示,不影响其他渠道。