krillplayer-plugin 0.1.1 → 0.2.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 +5 -0
- package/dist/cli.js +179 -164
- package/package.json +3 -2
- package/skill/krillplayer-plugin/SKILL.md +2 -1
- package/skill/krillplayer-plugin/assets/samples/file-share/plugin.ts +1 -20
- package/skill/krillplayer-plugin/assets/samples/media-server/plugin.ts +1 -35
- package/skill/krillplayer-plugin/assets/samples/network-share/plugin.ts +1 -20
- package/skill/krillplayer-plugin/references/choosing-a-kind.md +2 -2
- package/skill/krillplayer-plugin/references/contract.d.ts +60 -99
- package/skill/krillplayer-plugin/references/errors-and-fixes.md +1 -1
- package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-empty-folder.json +0 -11
- package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-folder-gone-not-found.json +0 -12
- package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-folder-lists-subfolders-and-media.json +0 -28
- package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-folder-second-page.json +0 -22
- package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-folder-skips-subtitles.json +0 -21
- package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-root-first-page.json +0 -25
- package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-root-second-page.json +0 -22
- package/skill/krillplayer-plugin/assets/samples/media-server/cases/library-changes-everything-first-page.json +0 -74
- package/skill/krillplayer-plugin/assets/samples/media-server/cases/library-changes-everything-last-page.json +0 -86
- package/skill/krillplayer-plugin/assets/samples/media-server/cases/library-changes-nothing-new.json +0 -12
- package/skill/krillplayer-plugin/assets/samples/media-server/cases/library-changes-since-a-token-with-a-removal.json +0 -88
- package/skill/krillplayer-plugin/assets/samples/media-server/cases/library-ids-first-page.json +0 -15
- package/skill/krillplayer-plugin/assets/samples/media-server/cases/library-ids-last-page.json +0 -14
- package/skill/krillplayer-plugin/assets/samples/network-share/cases/library-empty-folder.json +0 -60
- package/skill/krillplayer-plugin/assets/samples/network-share/cases/library-folder-gives-size-and-modified-time.json +0 -78
- package/skill/krillplayer-plugin/assets/samples/network-share/cases/library-folder-gone-not-found.json +0 -60
- package/skill/krillplayer-plugin/assets/samples/network-share/cases/library-folder-second-page.json +0 -71
- package/skill/krillplayer-plugin/assets/samples/network-share/cases/library-read-a-range.json +0 -62
- package/skill/krillplayer-plugin/assets/samples/network-share/cases/library-read-an-info-file.json +0 -62
- package/skill/krillplayer-plugin/assets/samples/network-share/cases/library-read-file-gone-not-found.json +0 -62
- package/skill/krillplayer-plugin/assets/samples/network-share/cases/library-root.json +0 -84
- package/skill/krillplayer-plugin/assets/samples/network-share/cases/library-source-offline-retryable.json +0 -61
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "krillplayer-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Write, pack, record and test KrillPlayer source plugins on the App's own QuickJS-ng engine, with an AI skill.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://krillplayer.kami.asia",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"templates",
|
|
26
26
|
"skill",
|
|
27
27
|
"README.md",
|
|
28
|
+
"CHANGELOG.md",
|
|
28
29
|
"LICENSE"
|
|
29
30
|
],
|
|
30
31
|
"dependencies": {
|
|
@@ -32,6 +33,6 @@
|
|
|
32
33
|
"eslint": "9.39.5"
|
|
33
34
|
},
|
|
34
35
|
"optionalDependencies": {
|
|
35
|
-
"@krillplayer/plugin-engine-darwin-arm64": "0.
|
|
36
|
+
"@krillplayer/plugin-engine-darwin-arm64": "0.2.0"
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -40,11 +40,12 @@ cd <目录> && npm install && npx krillplayer-plugin check
|
|
|
40
40
|
先弄清来源有什么,再动代码:
|
|
41
41
|
|
|
42
42
|
- **种类**:照 [choosing-a-kind.md](references/choosing-a-kind.md) 的问题按顺序问,给来源里的每样东西定一个种类(频道、合集、条目各自的哪一种)。哪个都不像时不要硬套。
|
|
43
|
-
- **槽位**:大多数来源导出 `browse`(`list` 必须有,`search`、`channel`、`collection`、`schedule` 按需)与 `play`(`start
|
|
43
|
+
- **槽位**:大多数来源导出 `browse`(`list` 必须有,`search`、`channel`、`collection`、`schedule` 按需)与 `play`(`start`)。插件只交数据,不交版式:有几份列表(推荐、分区、排行)的导出 `browse.lists`,交几份具名列表,`list`、`parameters`、`options` 多收一个列表的 id(`BrowseListsSlot`);只有一份的不导出 `lists`(`BrowseSlot`)。来源页怎么画由 App 定,没有拼页面的槽位。认分享链接导出顶层的 `resolve`;开播状态导出 `status`;要登录导出 `login`。能按作品回答有没有可播版本的来源导出 `resources`(`find`,返回版本,不是条目)。App 不整库扫描来源,没有列出全部内容的槽位。只给作品清单(榜单)的目录插件只导出 `browse`,电影与剧集带上外部 `ids`,App 就把它们当作品,版本由别的来源给。函数名与参数只照 `contract.d.ts` 里的 `BrowseListsSlot`、`BrowseSlot`、`PlaySlot` 等接口写。
|
|
44
44
|
- **App 尚未使用**:`contract.d.ts` 里行尾注释标着「App 尚未使用」的函数与字段,契约里已经有了,这一版的 App 还没接上:导出了这类函数,打包与试跑照常通过,但会打一条 `WARN`,App 不会调它;这类字段给了也不会被读。先把标注之外的做好,标注的按来源有的给,别为了它们改种类或 id。
|
|
45
45
|
- **id**:每个频道、合集、条目的 id 由你定,要稳定(之后改 id 等于让用户的订阅、收藏、续播全部失效)。同一来源里能起播的 id 不重复;直播条目的 id 也由你给。
|
|
46
46
|
- **主机**:插件自己经 `krillplayer.http.request` 发的请求只能去清单 `hosts` 里的主机,按主机名精确匹配,不分大小写,不看端口,**不含子域名**(`api.example.com` 与 `example.com` 要分别写),重定向的每一跳都查。`hosts` 只管插件自己的请求:`play.start` 交给播放器的流地址、`image` 等图片地址不用写进去,播放器拉流时的重定向也不查。用户自己填的服务器地址:声明 `userProvidedURLs: true`,并在 `parameters` 里声明一个 `kind: "url"` 的实例参数。
|
|
47
47
|
- **图片地址**:公网的只取 https(给 http 时改成 https 取),局域网与本机的只在它就是用户填的那台主机时才取,按用户填的协议。App 按「来源实例、去掉尺寸参数后的地址、尺寸档」缓存图片;地址里每次都变的令牌或盐(例如 Subsonic 的 `t`、`s`,Emby 的 `api_key`)写进清单的 `imageCacheIgnoredParameters`,换了令牌仍命中同一份缓存。
|
|
48
|
+
- **来源与登录**:用户在 App 的来源页每添加一次就是一个来源实例,没有实例参数也能加多个(多个账号就是多个来源)。导出 `login` 的插件添加时就能登录,登不登由用户选;不登录什么都看不了的来源在清单写 `loginRequired: true`,添加时就必须登录。确实只能有一个来源的才写 `singleSource: true`。设置项(`settings`)默认所有来源共用一份,要每个来源各一份的那一项写 `perSource: true`。
|
|
48
49
|
- **失败**:每种失败应答(不存在、要登录、地区限制、还没开始、已结束、被拒、暂时失败)给哪个 `PluginErrorKind`。
|
|
49
50
|
|
|
50
51
|
完成判据:对每个要导出的函数,说得出它的入参、返回类型名、每种失败抛哪个 kind;id 的写法定下来;`hosts` 列全。
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// 目录的应答是一份 WebDAV 的 PROPFIND(207 Multi-Status),用 krillplayer.formats.xml 解,按命名空间与本地名找元素。
|
|
5
5
|
// 资料库槽位把同一份目录给内核扫描进索引:一次一层,带名字、大小与修改时间,目录不在了抛 notFound。
|
|
6
6
|
import type {
|
|
7
|
-
At, BrowseSlot, CollectionRef, Entry, File, Folder,
|
|
7
|
+
At, BrowseSlot, CollectionRef, Entry, File, Folder, Paged, PlaySlot, XMLNode,
|
|
8
8
|
} from "krillplayer-plugin";
|
|
9
9
|
|
|
10
10
|
const SERVER = "https://dav.example/share/";
|
|
@@ -158,25 +158,6 @@ export const browse = {
|
|
|
158
158
|
},
|
|
159
159
|
} satisfies BrowseSlot;
|
|
160
160
|
|
|
161
|
-
// 资料库:一次列一层,内核自己往下走。文件的 itemId 就是 browse 给的那个 File 的 id(路径),不是音视频的文件不列。
|
|
162
|
-
export const library = {
|
|
163
|
-
async list(krillplayer, dir, cursor) {
|
|
164
|
-
const found = listingOf(krillplayer, dir);
|
|
165
|
-
if (found === undefined) throw krillplayer.error("notFound", "这个文件夹已不在了");
|
|
166
|
-
const entries = found.flatMap((resource): LibraryEntry[] => {
|
|
167
|
-
const times = resource.modified === undefined ? {} : { modified: resource.modified };
|
|
168
|
-
if (resource.directory) return [{ type: "directory", path: resource.path, name: resource.name, ...times }];
|
|
169
|
-
const media = mediaOf(resource);
|
|
170
|
-
if (media === undefined) return [];
|
|
171
|
-
return [{
|
|
172
|
-
type: "file", path: resource.path, name: resource.name, itemId: resource.path, media,
|
|
173
|
-
...(resource.size === undefined ? {} : { size: resource.size }), ...times,
|
|
174
|
-
}];
|
|
175
|
-
});
|
|
176
|
-
return page(entries, cursor);
|
|
177
|
-
},
|
|
178
|
-
} satisfies LibrarySlot;
|
|
179
|
-
|
|
180
161
|
// 文件按路径起播:地址是来源根加上逐段编码的路径。文件不连播,也没有别的线路。
|
|
181
162
|
// 文件不在了抛 notFound:内核给出「文件不在了」的说明,并重扫它所在的目录。
|
|
182
163
|
export const play = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// 看点:电影、剧集、季、集、影视合集、文件夹与文件各是一个种类;层级用字段表示,不拼进 id;
|
|
3
3
|
// 同一部电影的几个文件是一个条目的几个版本;集按播放顺序排好,at.around 从那一集开始往后给。
|
|
4
4
|
import type {
|
|
5
|
-
At, BrowseSlot, Collection, CollectionRef, Entry, Episode, File, Item,
|
|
5
|
+
At, BrowseSlot, Collection, CollectionRef, Entry, Episode, File, Item, Movie, Paged, PlaySlot,
|
|
6
6
|
} from "krillplayer-plugin";
|
|
7
7
|
|
|
8
8
|
const MEDIA = "https://media.example/stream";
|
|
@@ -116,40 +116,6 @@ export const browse = {
|
|
|
116
116
|
},
|
|
117
117
|
} satisfies BrowseSlot;
|
|
118
118
|
|
|
119
|
-
// 资料库:媒体服务器不列目录,交回自己已经识别过的电影与集,内核直接用这里的 id 与 ids 进海报墙,
|
|
120
|
-
// 不按文件名搜索。每个条目记着最后一次改动的序号,交回的 since 是最新的序号,since 之后改过的才交回;删掉的条目在 REMOVED 里。
|
|
121
|
-
// 影视合集(boxSet)与文件夹不进资料库:服务器自建的合集只在它自己的浏览里。
|
|
122
|
-
const CHANGED: Record<string, number> = { m1: 1, m2: 2, "e0-1": 3, "e1-1": 3, "e1-2": 4, "e2-1": 5 };
|
|
123
|
-
const REMOVED: Record<string, number> = { m0: 4 };
|
|
124
|
-
const LATEST = "5";
|
|
125
|
-
const SERIES = COLLECTIONS.find((candidate): candidate is Series => candidate.kind === "series")!;
|
|
126
|
-
const identified = (value: Movie | Episode): LibraryEntry =>
|
|
127
|
-
value.kind === "movie" ? { type: "identified", item: value } : { type: "identified", item: value, series: SERIES };
|
|
128
|
-
|
|
129
|
-
export const library = {
|
|
130
|
-
async changes(krillplayer, since, cursor) {
|
|
131
|
-
const after = since === null ? 0 : Number(since);
|
|
132
|
-
if (!Number.isInteger(after)) throw krillplayer.error("other", "认不出的 since");
|
|
133
|
-
const changed = [...MOVIES, ...EPISODES].filter((candidate) => CHANGED[candidate.id]! > after).map(identified);
|
|
134
|
-
const start = Number(cursor ?? "0");
|
|
135
|
-
const end = start + PAGE_SIZE;
|
|
136
|
-
const removed = since === null || start > 0 ? [] : Object.keys(REMOVED).filter((id) => REMOVED[id]! > after);
|
|
137
|
-
return {
|
|
138
|
-
entries: changed.slice(start, end),
|
|
139
|
-
...(removed.length > 0 ? { removed } : {}),
|
|
140
|
-
...(end < changed.length ? { next: String(end) } : {}),
|
|
141
|
-
since: LATEST,
|
|
142
|
-
};
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
async ids(_krillplayer, cursor) {
|
|
146
|
-
const all = [...MOVIES, ...EPISODES].map((candidate) => candidate.id);
|
|
147
|
-
const start = Number(cursor ?? "0");
|
|
148
|
-
const end = start + 4;
|
|
149
|
-
return { ids: all.slice(start, end), ...(end < all.length ? { next: String(end) } : {}) };
|
|
150
|
-
},
|
|
151
|
-
} satisfies LibrarySlot;
|
|
152
|
-
|
|
153
119
|
// 条目与版本都用自己的 id 起播:一个来源实例里它们不重复。
|
|
154
120
|
export const play = {
|
|
155
121
|
async start(krillplayer, itemId) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// 不接住 krillplayer.files 的失败:找不到、没有权限、连不上各带着自己的种类交给内核;
|
|
5
5
|
// 起播时顺手把同目录、同名的字幕文件列进 Playable.subtitles,地址同样用 krillplayer.files.playable 给。
|
|
6
6
|
import type {
|
|
7
|
-
At, BrowseSlot, CollectionRef, Entry, File, FileEntry, Folder, KrillPlayer,
|
|
7
|
+
At, BrowseSlot, CollectionRef, Entry, File, FileEntry, Folder, KrillPlayer, Paged, Playable, PlaySlot,
|
|
8
8
|
} from "krillplayer-plugin";
|
|
9
9
|
|
|
10
10
|
const VIDEO = new Set(["mp4", "m4v", "mov", "mkv", "avi", "ts", "m2ts", "webm", "flv", "wmv"]);
|
|
@@ -66,25 +66,6 @@ export const browse = {
|
|
|
66
66
|
},
|
|
67
67
|
} satisfies BrowseSlot;
|
|
68
68
|
|
|
69
|
-
// 资料库:对 krillplayer.files 的薄包装。一次列一层,内核自己往下走;文件的 itemId 就是 browse 给的那个 File 的 id。
|
|
70
|
-
export const library = {
|
|
71
|
-
async list(krillplayer, dir, cursor) {
|
|
72
|
-
const page = await krillplayer.files.list(dir, cursor);
|
|
73
|
-
const entries = page.entries.filter(shown).flatMap((entry): LibraryEntry[] => {
|
|
74
|
-
if (entry.isDirectory) return [{ type: "directory", path: entry.path, name: entry.name, ...times(entry) }];
|
|
75
|
-
const media = mediaOf(entry.name);
|
|
76
|
-
if (media === undefined) return [];
|
|
77
|
-
return [{ type: "file", path: entry.path, name: entry.name, itemId: entry.path, media, ...sizes(entry), ...times(entry) }];
|
|
78
|
-
});
|
|
79
|
-
return { entries, ...(page.next === undefined ? {} : { next: page.next }) };
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
// 内核读同目录的信息文件(NFO)用。
|
|
83
|
-
async read(krillplayer, path, offset, length) {
|
|
84
|
-
return krillplayer.files.read(path, offset, length);
|
|
85
|
-
},
|
|
86
|
-
} satisfies LibrarySlot;
|
|
87
|
-
|
|
88
69
|
// 同目录里与视频同名的字幕:「片名.srt」或「片名.zh.srt」,中间那一段当语言,没有就是 und。最多翻 SUBTITLE_PAGES 页目录。
|
|
89
70
|
const SUBTITLE_PAGES = 20;
|
|
90
71
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
排期与预告的分界只有一条:**来源给没给它一个能拿去 `play.start` 的 id。** 给了是预告,没给是排期。
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
哪个都不像时不要硬套:用最朴素的 `onDemand` 或 `file`,并在插件的说明里写一句。这是我们该不该加种类的信号。
|
|
38
38
|
|
|
39
39
|
试跑器按本节的类型逐个检查返回的对象,字段不属于这个种类、必填的没给,都直接报错并说明该怎么改。
|
|
40
40
|
|
|
@@ -66,4 +66,4 @@
|
|
|
66
66
|
| `onDemand` 点播 | 频道发布的、随时能播的一段内容,不是影视作品,也不是播客单集。平台上的普通视频、直播的回放、电台的回听都是它 | 记 | 播放页 |
|
|
67
67
|
| `live` 直播 | 此刻正在播出的一路:直播间在播的、电视台与电台正在播的 | 不记 | 播放页 |
|
|
68
68
|
| `upcoming` 预告 | 来源给了独立 id、还没开始的一场直播或首播 | 不能播 | 详情与提醒 |
|
|
69
|
-
| `file` 文件 |
|
|
69
|
+
| `file` 文件 | 文件类来源里的一个媒体文件。App 按文件夹浏览,不把它认成作品,续播记在文件上 | 记 | 播放页 |
|
|
@@ -23,7 +23,7 @@ export interface Paged<T> {
|
|
|
23
23
|
export type Ids = Record<string, string>;
|
|
24
24
|
|
|
25
25
|
// 能力由打包器按导出的函数生成(SLOT_RULES),插件不手写。
|
|
26
|
-
export type Capability = "browse" | "music" | "play" | "resolve" | "
|
|
26
|
+
export type Capability = "browse" | "music" | "play" | "resolve" | "resources" | "subtitles" | "subtitleSearch" | "danmaku" | "danmakuMatch" | "status" | "login" | "playbackReport" | "views" | "danmakuSend" | "browseLists";
|
|
27
27
|
|
|
28
28
|
// 内容对象。通用域三样结构:频道、合集、条目,每个种类一个类型,只带属于它的字段。
|
|
29
29
|
// 种类的取值是内核定死的词表,插件不能自造。比插件旧的 App 遇到不认识的种类时跳过数组里的那一项、把可选字段当作没给;
|
|
@@ -124,11 +124,11 @@ export interface PodcastEpisode {
|
|
|
124
124
|
summary?: string; // App 尚未使用
|
|
125
125
|
media: Media;
|
|
126
126
|
podcast: ChannelRef;
|
|
127
|
-
season?: number; //
|
|
128
|
-
index?: number; //
|
|
127
|
+
season?: number; // 整数
|
|
128
|
+
index?: number; // 整数
|
|
129
129
|
episodeType?: PodcastEpisodeType; // App 尚未使用
|
|
130
130
|
duration?: number;
|
|
131
|
-
published?: number;
|
|
131
|
+
published?: number;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
export type PodcastEpisodeType = "full" | "trailer" | "bonus";
|
|
@@ -178,7 +178,7 @@ export interface Upcoming {
|
|
|
178
178
|
end?: number; // App 尚未使用
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
// filename
|
|
181
|
+
// filename 是原始文件名,给字幕匹配用。
|
|
182
182
|
export interface File {
|
|
183
183
|
kind: "file";
|
|
184
184
|
id: string;
|
|
@@ -255,7 +255,7 @@ export interface Season {
|
|
|
255
255
|
ancestors?: CollectionRef[]; // App 尚未使用
|
|
256
256
|
index: number; // 整数
|
|
257
257
|
series: CollectionRef;
|
|
258
|
-
ids?: Ids;
|
|
258
|
+
ids?: Ids; // App 尚未使用
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
export interface BoxSet {
|
|
@@ -266,7 +266,7 @@ export interface BoxSet {
|
|
|
266
266
|
summary?: string;
|
|
267
267
|
count?: number; // 整数
|
|
268
268
|
ancestors?: CollectionRef[]; // App 尚未使用
|
|
269
|
-
ids?: Ids;
|
|
269
|
+
ids?: Ids; // App 尚未使用
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
export interface Playlist {
|
|
@@ -299,6 +299,16 @@ export type Entry =
|
|
|
299
299
|
| { type: "collection"; collection: Collection }
|
|
300
300
|
;
|
|
301
301
|
|
|
302
|
+
// 具名列表:插件交出的一份数据,id 稳定,App 按 kind(内容大类)给它取默认的样式,怎么画全由 App 定。
|
|
303
|
+
// video 影视与点播,live 直播与电视台,audio 电台与播客,file 文件与文件夹。
|
|
304
|
+
export type BrowseListKind = "video" | "live" | "audio" | "file";
|
|
305
|
+
|
|
306
|
+
export interface BrowseList {
|
|
307
|
+
id: string;
|
|
308
|
+
title: string;
|
|
309
|
+
kind: BrowseListKind;
|
|
310
|
+
}
|
|
311
|
+
|
|
302
312
|
// 音乐曲库:歌手、专辑、歌单、歌曲四样,不是频道、合集、条目的种类。
|
|
303
313
|
// 歌曲的歌手与它所在专辑的歌手分开给:合辑的专辑歌手可以为空,compilation 为真。歌曲不记续播位置,进播放队列。
|
|
304
314
|
export interface ArtistRef {
|
|
@@ -415,54 +425,6 @@ export interface LyricsLine {
|
|
|
415
425
|
translation?: string;
|
|
416
426
|
}
|
|
417
427
|
|
|
418
|
-
// 资料库:文件类来源的 list 列出一个目录下的一层,内核据此扫描进索引库。path 相对来源实例的根,根是 "",
|
|
419
|
-
// 分隔符是 /,开头不带 /。path 只用于识别与手动改正,起播只认 itemId(与 browse 给的同一个 File 的 id 一致)。
|
|
420
|
-
// 媒体服务器实现 changes 与 ids,交回已经识别过的条目(identified),内核直接用它给的 id,不再按文件名搜索。
|
|
421
|
-
export interface LibraryDirectory {
|
|
422
|
-
type: "directory";
|
|
423
|
-
path: string;
|
|
424
|
-
name: string;
|
|
425
|
-
modified?: number;
|
|
426
|
-
tag?: string;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
export interface LibraryFile {
|
|
430
|
-
type: "file";
|
|
431
|
-
path: string;
|
|
432
|
-
name: string;
|
|
433
|
-
itemId: string;
|
|
434
|
-
media: Media;
|
|
435
|
-
size?: number; // 整数
|
|
436
|
-
modified?: number;
|
|
437
|
-
tag?: string;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
// 媒体服务器已经识别过的一部电影(movie)或一集(episode),别的种类内核跳过。item.id 是起播用的 id,
|
|
441
|
-
// 也是增量与对账认这一项的键;电影的 versions 各是一个文件,起播用版本自己的 id。ids 是作品的外部 id(集的看 series.ids),
|
|
442
|
-
// 内核拿它与别的来源里的同一部聚合。series 是集所在的剧的完整资料(海报、年份),给了内核用它显示这部剧,没给时只有 item.series 里的片名与 ids。
|
|
443
|
-
export interface LibraryIdentified {
|
|
444
|
-
type: "identified";
|
|
445
|
-
item: Item;
|
|
446
|
-
series?: Series;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
export type LibraryEntry = LibraryDirectory | LibraryFile | LibraryIdentified;
|
|
450
|
-
|
|
451
|
-
// changes 的一页:entries 是 since 之后新增或改过的条目(都是 identified),removed 是来源知道的删除(条目 id)。
|
|
452
|
-
// next 有值时内核原样带回取下一页;since 是全部取完之后下次增量用的 since,内核只认最后一页(没有 next 的那页)给的。
|
|
453
|
-
export interface LibraryChanges {
|
|
454
|
-
entries: LibraryEntry[];
|
|
455
|
-
removed?: string[];
|
|
456
|
-
next?: string;
|
|
457
|
-
since: string;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
// ids 的一页:来源里现在全部条目的 id(与 identified 的 item.id 一致),内核拿它做只取 id 的全量对账,认出删除。
|
|
461
|
-
export interface LibraryIds {
|
|
462
|
-
ids: string[];
|
|
463
|
-
next?: string;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
428
|
// krillplayer.files:内核替插件读用户填的那台服务器或选的那个文件夹,插件拿不到套接字,也走不出来源实例的根。
|
|
467
429
|
// 清单的 files 声明要哪种协议;path 相对来源实例的根,根是 "",分隔符是 /,开头不带 /,不接受 . 与 ..。
|
|
468
430
|
// modified 是 Unix 秒;目录不带 size。
|
|
@@ -518,6 +480,7 @@ export interface ResolvedBrowse {
|
|
|
518
480
|
// multiChoice 是一个 JSON 数组的文本。secret 的值按凭证存放,不进任何 id,也不进日志。不认识的种类当作 text。
|
|
519
481
|
// dynamicOptions:选项要向插件的 options(krillplayer, name, values) 要;dependsOn 里的参数变了重新要。
|
|
520
482
|
// visibleWhen 全部满足才显示;当前不显示的参数不传给插件。constant 不显示给用户,值固定为 defaultValue。
|
|
483
|
+
// perSource 只在清单的 settings 里有意义:这一项每个来源各存一份,在来源的编辑页里改;不写是插件级,所有来源共用一份。
|
|
521
484
|
export interface Parameter {
|
|
522
485
|
name: string;
|
|
523
486
|
title: string;
|
|
@@ -530,6 +493,7 @@ export interface Parameter {
|
|
|
530
493
|
dynamicOptions?: boolean;
|
|
531
494
|
dependsOn?: string[];
|
|
532
495
|
visibleWhen?: ParameterCondition[];
|
|
496
|
+
perSource?: boolean;
|
|
533
497
|
}
|
|
534
498
|
|
|
535
499
|
// App 不认识的取值当作 "text"。
|
|
@@ -574,8 +538,11 @@ export interface PlatformCapabilities {
|
|
|
574
538
|
tvOS?: Capability[];
|
|
575
539
|
}
|
|
576
540
|
|
|
577
|
-
//
|
|
578
|
-
//
|
|
541
|
+
// 插件是来源类型,来源是它的实例:能浏览或有曲库的插件,用户在来源页「+」每添加一次就建一个来源实例,没有实例参数的也一样。
|
|
542
|
+
// parameters 是实例参数,添加时填;url 参数里的主机在声明了 userProvidedURLs 时放行。
|
|
543
|
+
// settings 是设置项,值由插件用 krillplayer.settings.get() 读;默认插件级,带 perSource 的那一项每个来源各一份。
|
|
544
|
+
// loginRequired:导出了 login 的插件声明添加来源时必须登录;不写是可以登录、也可以不登录。没导出 login 的插件没有登录,不能写它。
|
|
545
|
+
// singleSource:这个插件只能有一个来源实例;不写可以有多个(多个账号就是多个来源)。
|
|
579
546
|
export interface PluginManifest {
|
|
580
547
|
id: string;
|
|
581
548
|
sourceId: string;
|
|
@@ -588,6 +555,8 @@ export interface PluginManifest {
|
|
|
588
555
|
hosts: string[];
|
|
589
556
|
userProvidedURLs?: boolean;
|
|
590
557
|
readsCredentials?: boolean;
|
|
558
|
+
loginRequired?: boolean;
|
|
559
|
+
singleSource?: boolean;
|
|
591
560
|
imageCacheIgnoredParameters?: string[];
|
|
592
561
|
files?: FilesProtocol;
|
|
593
562
|
appKeys?: string[];
|
|
@@ -677,16 +646,8 @@ export type PlayableSegmentKind = "intro" | "outro" | "chapter";
|
|
|
677
646
|
|
|
678
647
|
export type PlayableDecryptionMethod = "cencAesCtr";
|
|
679
648
|
|
|
680
|
-
// 指向插件的一个页面:内核用 page 与 values 调 views.page;title 是推入页面时的标题。
|
|
681
|
-
export interface PageLink {
|
|
682
|
-
page: string;
|
|
683
|
-
title?: string;
|
|
684
|
-
values?: Record<string, string>;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
649
|
// 卡片按 kind 各取所需的字段,缺了必需字段的卡片按坏元素跳过:
|
|
688
|
-
// entry 必须有 entry:点频道与合集进内核的原生页面,点条目起播或进详情;
|
|
689
|
-
// banner 必须有 image,给 entry 或 open 之一;comment 必须有 text,title 是作者、image 是头像、time 是 Unix 秒。
|
|
650
|
+
// entry 必须有 entry:点频道与合集进内核的原生页面,点条目起播或进详情;comment 必须有 text,title 是作者、image 是头像、time 是 Unix 秒。
|
|
690
651
|
// 卡片自己没有 image 时用 entry 里对象的图。徽标与续播进度由内核按 entry 画,插件不给;颜色、尺寸与动画都由内核决定。
|
|
691
652
|
export interface Card {
|
|
692
653
|
kind: CardKind;
|
|
@@ -697,22 +658,20 @@ export interface Card {
|
|
|
697
658
|
text?: string;
|
|
698
659
|
time?: number;
|
|
699
660
|
entry?: Entry;
|
|
700
|
-
open?: PageLink;
|
|
701
661
|
}
|
|
702
662
|
|
|
703
|
-
export type CardKind = "entry" | "
|
|
663
|
+
export type CardKind = "entry" | "comment";
|
|
704
664
|
|
|
705
|
-
// row 横向列表,grid 网格,list
|
|
665
|
+
// row 横向列表,grid 网格,list 竖排的紧凑行(评论、面板里的推荐)。
|
|
706
666
|
export interface Section {
|
|
707
667
|
layout: SectionLayout;
|
|
708
668
|
title?: string;
|
|
709
669
|
cards: Card[];
|
|
710
|
-
more?: PageLink;
|
|
711
670
|
}
|
|
712
671
|
|
|
713
|
-
export type SectionLayout = "row" | "grid" | "list"
|
|
672
|
+
export type SectionLayout = "row" | "grid" | "list";
|
|
714
673
|
|
|
715
|
-
//
|
|
674
|
+
// 播放器面板的内容(views.panel):插件用组件拼出的一页。filters 里的选项参数渲染成分段筛选,选中的值按参数名放进下一次请求的 values;
|
|
716
675
|
// next 有值时内核滚到底再要下一页,把它原样放进下一次请求的 cursor:下一页的第一个分区与上一页最后一个分区布局与标题相同时接在后面。
|
|
717
676
|
// empty 是没有分区时空状态里的说明。Swift 里叫 PageContent:内核校验后的页面类型叫 ComponentPage。
|
|
718
677
|
export interface ComponentPage {
|
|
@@ -724,9 +683,8 @@ export interface ComponentPage {
|
|
|
724
683
|
empty?: string;
|
|
725
684
|
}
|
|
726
685
|
|
|
727
|
-
// 卡片操作的结果:
|
|
686
|
+
// 卡片操作的结果:message 是给用户看的一句话。
|
|
728
687
|
export interface ActionResult {
|
|
729
|
-
open?: PageLink;
|
|
730
688
|
message?: string;
|
|
731
689
|
}
|
|
732
690
|
|
|
@@ -1019,15 +977,19 @@ export interface RSSFeed {
|
|
|
1019
977
|
|
|
1020
978
|
// krillplayer.metadata:目录插件经它查影视资料,请求由内核发出,插件看不到背后是哪家服务,也不用在 hosts 里声明。
|
|
1021
979
|
// 名字是自己定的,不跟哪一家的接口名与类型编号走。榜单:trending 是本周的热门,popular 是一直以来的热门,topRated 是评分高的,
|
|
1022
|
-
// upcoming
|
|
980
|
+
// upcoming 与 nowPlaying(正在院线上映)只有电影,onAir 只有剧集。筛选(genre、country、year、network)只有 popular 与 topRated 能用,
|
|
981
|
+
// 可以一起用;network 是剧集首播的平台,只有剧集能用。
|
|
1023
982
|
// 剧集没有 horror、history、music、romance、thriller,电影没有 kids、news、reality、soap、talk;剧集的 action 与 adventure、
|
|
1024
983
|
// scienceFiction 与 fantasy 各是同一组。组合不成立、名字写错,调用直接失败并说明原因。
|
|
1025
984
|
export type WorkKind = "movie" | "series";
|
|
1026
985
|
|
|
1027
|
-
export type ListName = "trending" | "popular" | "topRated" | "upcoming" | "onAir";
|
|
986
|
+
export type ListName = "trending" | "popular" | "topRated" | "upcoming" | "nowPlaying" | "onAir";
|
|
1028
987
|
|
|
1029
988
|
export type Genre = "action" | "adventure" | "animation" | "comedy" | "crime" | "documentary" | "drama" | "family" | "fantasy" | "history" | "horror" | "kids" | "music" | "mystery" | "news" | "reality" | "romance" | "scienceFiction" | "soap" | "talk" | "thriller" | "war" | "western";
|
|
1030
989
|
|
|
990
|
+
// 剧集首播的平台,名字是自己定的一组。
|
|
991
|
+
export type Network = "netflix" | "hbo" | "disneyPlus" | "appleTv" | "primeVideo" | "hulu" | "peacock" | "paramountPlus" | "iqiyi" | "tencentVideo" | "youku" | "bilibili" | "mangoTv";
|
|
992
|
+
|
|
1031
993
|
// search 与 list 返回的 ids 只有 tmdb;get 返回这家知道的全部判定 id,调用方带来的别家 id 原样留着。image 是海报,经代理转发,不用声明域名。
|
|
1032
994
|
export interface Work {
|
|
1033
995
|
kind: WorkKind;
|
|
@@ -1045,9 +1007,10 @@ export interface MetadataSearchOptions {
|
|
|
1045
1007
|
cursor?: string;
|
|
1046
1008
|
}
|
|
1047
1009
|
|
|
1048
|
-
// 筛选只有 popular 与 topRated 能用;country 是 ISO 3166-1 两位大写代码,year
|
|
1010
|
+
// 筛选只有 popular 与 topRated 能用;country 是 ISO 3166-1 两位大写代码,year 是上映或首播年,network 只有剧集能用。
|
|
1049
1011
|
export interface MetadataListOptions {
|
|
1050
1012
|
genre?: Genre;
|
|
1013
|
+
network?: Network;
|
|
1051
1014
|
country?: string;
|
|
1052
1015
|
year?: number; // 整数
|
|
1053
1016
|
cursor?: string;
|
|
@@ -1345,11 +1308,27 @@ export interface KrillPlayer {
|
|
|
1345
1308
|
// 槽位的调用约定:导出名就是槽位名,每个函数的第一个参数是 krillplayer。槽位接口不生成,内核按名字调用。
|
|
1346
1309
|
// 翻页一律用游标:函数收 cursor,返回 Paged<T>,next 有值就是还有下一页;第一页不传 cursor。翻页只往后翻。
|
|
1347
1310
|
|
|
1348
|
-
//
|
|
1311
|
+
// 浏览:通用域的来源实现这一组。插件只交数据,不交版式,来源页与首页怎么画由 App 定。
|
|
1312
|
+
// 有几份列表的插件导出 lists,交出几份具名列表(形状同 music 的 sections),写成 BrowseListsSlot:list、parameters、options
|
|
1313
|
+
// 都多收一个列表的 id。只有一份列表的插件不导出 lists,写成 BrowseSlot:list、parameters、options 不收列表的 id。
|
|
1314
|
+
// values 是这份列表参数的取值,按参数名传入,都是字符串。
|
|
1349
1315
|
// channel 与 collection 返回对象本身加它下面的一页;条目必须已经按播放顺序排好,内核不重排。
|
|
1350
1316
|
// schedule 一次查多个频道的节目单,返回按频道 id 分的排期。
|
|
1351
1317
|
// search 是跨来源搜索里本来源的那一份:内核同时问每个导出了 search 的来源要第一页,结果按来源分组标明来源。
|
|
1318
|
+
export interface BrowseListsSlot {
|
|
1319
|
+
lists(krillplayer: KrillPlayer): BrowseList[] | Promise<BrowseList[]>;
|
|
1320
|
+
parameters?(krillplayer: KrillPlayer, list: string): Parameter[] | Promise<Parameter[]>;
|
|
1321
|
+
options?(krillplayer: KrillPlayer, list: string, name: string, values: Record<string, string>): Promise<Option[]>;
|
|
1322
|
+
list(krillplayer: KrillPlayer, list: string, values: Record<string, string>, cursor?: string): Promise<Paged<Entry>>;
|
|
1323
|
+
search?(krillplayer: KrillPlayer, query: string, cursor?: string): Promise<Paged<Entry>>;
|
|
1324
|
+
channel?(krillplayer: KrillPlayer, channelId: string, at?: At): Promise<ChannelPage>;
|
|
1325
|
+
collection?(krillplayer: KrillPlayer, collectionId: string, at?: At): Promise<CollectionPage>;
|
|
1326
|
+
schedule?(krillplayer: KrillPlayer, channelIds: string[], range: { start: number; end: number }): Promise<Record<string, ScheduleEntry[]>>;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
// 只有一份列表的特例:App 把它当作一份具名列表,标题用来源的名字。
|
|
1352
1330
|
export interface BrowseSlot {
|
|
1331
|
+
lists?: never;
|
|
1353
1332
|
parameters?(krillplayer: KrillPlayer): Parameter[] | Promise<Parameter[]>;
|
|
1354
1333
|
options?(krillplayer: KrillPlayer, name: string, values: Record<string, string>): Promise<Option[]>;
|
|
1355
1334
|
list(krillplayer: KrillPlayer, values: Record<string, string>, cursor?: string): Promise<Paged<Entry>>;
|
|
@@ -1375,23 +1354,8 @@ export interface MusicSlot {
|
|
|
1375
1354
|
lyrics?(krillplayer: KrillPlayer, songId: string): Promise<Lyrics | null>;
|
|
1376
1355
|
}
|
|
1377
1356
|
|
|
1378
|
-
// 资料库:能列举全部内容的来源实现它,内核据此扫描进索引库。
|
|
1379
|
-
// list 给 dir 下的一层(不递归,子目录由内核再列),翻页用游标;dir 相对来源实例的根,根是 ""。
|
|
1380
|
-
// 目录不存在时抛 krillplayer.error("notFound"),内核据此删掉它在索引里的内容;连不上抛 retryable、没有权限抛 loginRequired,
|
|
1381
|
-
// 内核什么都不删,把来源标为离线。read 读一个文件的一段(内核读 NFO 用,每个文件最多 64 KiB)。
|
|
1382
|
-
// 媒体服务器不实现 list,实现 changes 与 ids(两个一起):changes 交回 since 之后新增或改过的条目,都是来源已经识别过的
|
|
1383
|
-
// { type: "identified", item },since 为 null 时交回全部;ids 交回现在全部条目的 id,内核每天第一次增量与用户手动时拿它对账、认出删除。
|
|
1384
|
-
// 两者都按游标翻页。连不上抛 retryable、没有权限抛 loginRequired,内核什么都不删,条目照样留在海报墙上、标明不可播。
|
|
1385
|
-
export interface LibrarySlot {
|
|
1386
|
-
list?(krillplayer: KrillPlayer, dir: string, cursor?: string): Promise<Paged<LibraryEntry>>;
|
|
1387
|
-
read?(krillplayer: KrillPlayer, path: string, offset: number, length: number): Promise<Uint8Array>;
|
|
1388
|
-
changes?(krillplayer: KrillPlayer, since: string | null, cursor?: string): Promise<LibraryChanges>;
|
|
1389
|
-
ids?(krillplayer: KrillPlayer, cursor?: string): Promise<LibraryIds>;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
1357
|
// 资源插件:用户要看某部作品时内核同时问每个资源插件,返回的每一项是一个版本,之后用它的 id 调 play.start;
|
|
1393
1358
|
// 不用造出季和剧集。没有就返回空数组,不抛错。内核给 find 的时限比别的调用短,超时当作没有。
|
|
1394
|
-
// 实现了 library 的来源不实现 find,否则同一份内容会出现两次。
|
|
1395
1359
|
export interface ResourcesSlot {
|
|
1396
1360
|
find(krillplayer: KrillPlayer, work: WorkQuery): Promise<ResourceVersion[]>;
|
|
1397
1361
|
}
|
|
@@ -1460,16 +1424,13 @@ export interface SubtitlesSlot {
|
|
|
1460
1424
|
fetch(krillplayer: KrillPlayer, trackId: string, itemId?: string): Promise<Subtitle>;
|
|
1461
1425
|
}
|
|
1462
1426
|
|
|
1463
|
-
// views
|
|
1464
|
-
// components 是内核的组件库版本(COMPONENT_LIBRARY.version)。
|
|
1465
|
-
//
|
|
1466
|
-
// item 与 channel 是来源内 id。
|
|
1467
|
-
export interface PageRequest { page: string; values: Record<string, string>; cursor?: string; components: number }
|
|
1427
|
+
// views 槽位:播放器面板与卡片操作。values 里的值都是字符串;cursor 是上一页给的 next,第一页不给;
|
|
1428
|
+
// components 是内核的组件库版本(COMPONENT_LIBRARY.version)。panel 与 action 的 id 来自清单的贡献点声明,
|
|
1429
|
+
// item 与 channel 是来源内 id。插件拼整页的 page 去掉了,来源页由 App 按具名列表画。
|
|
1468
1430
|
export interface PanelRequest { panel: string; item: string; values: Record<string, string>; cursor?: string; components: number }
|
|
1469
1431
|
export interface ActionRequest { action: string; item?: string; channel?: string }
|
|
1470
1432
|
|
|
1471
1433
|
export interface ViewsSlot {
|
|
1472
|
-
page(krillplayer: KrillPlayer, request: PageRequest): Promise<ComponentPage>;
|
|
1473
1434
|
panel?(krillplayer: KrillPlayer, request: PanelRequest): Promise<ComponentPage>;
|
|
1474
1435
|
action?(krillplayer: KrillPlayer, request: ActionRequest): Promise<ActionResult>;
|
|
1475
1436
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
| 报错里有 | 意思 | 怎么改 |
|
|
10
10
|
|---|---|---|
|
|
11
|
-
| `plugins export only` | plugin.ts 导出了契约里没有的名字 | 只导出槽位对象(browse、play、
|
|
11
|
+
| `plugins export only` | plugin.ts 导出了契约里没有的名字 | 只导出槽位对象(browse、play、status、login、danmaku、subtitles、playbackReport、views、parameters)与顶层函数 resolve;辅助函数不要 export |
|
|
12
12
|
| `is not in the contract` | 槽位对象里有契约没列的函数 | 把辅助函数移到槽位对象外面;函数名照 contract.d.ts 里的槽位接口拼 |
|
|
13
13
|
| `needs one of` | 槽位导出了却一项能力都生成不了 | 补上这一项列出的函数中的一个 |
|
|
14
14
|
| `is inherited; slot functions must be the object's own properties` | 槽位函数放在类的方法或原型上 | 写成对象字面量:export const browse = { async list(krillplayer, values, cursor) {…} } satisfies BrowseSlot |
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"slot": "library",
|
|
3
|
-
"call": "list",
|
|
4
|
-
"args": [
|
|
5
|
-
"Home Videos"
|
|
6
|
-
],
|
|
7
|
-
"exchanges": [],
|
|
8
|
-
"output": {
|
|
9
|
-
"entries": [
|
|
10
|
-
{
|
|
11
|
-
"type": "directory",
|
|
12
|
-
"path": "Home Videos/2025",
|
|
13
|
-
"name": "2025",
|
|
14
|
-
"modified": 1795748400
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"type": "file",
|
|
18
|
-
"path": "Home Videos/beach.MOV",
|
|
19
|
-
"name": "beach.MOV",
|
|
20
|
-
"itemId": "Home Videos/beach.MOV",
|
|
21
|
-
"media": "video",
|
|
22
|
-
"size": 1073741824,
|
|
23
|
-
"modified": 1795748400
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"next": "2"
|
|
27
|
-
}
|
|
28
|
-
}
|
package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-folder-second-page.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"slot": "library",
|
|
3
|
-
"call": "list",
|
|
4
|
-
"args": [
|
|
5
|
-
"Home Videos",
|
|
6
|
-
"2"
|
|
7
|
-
],
|
|
8
|
-
"exchanges": [],
|
|
9
|
-
"output": {
|
|
10
|
-
"entries": [
|
|
11
|
-
{
|
|
12
|
-
"type": "file",
|
|
13
|
-
"path": "Home Videos/interview.m4a",
|
|
14
|
-
"name": "interview.m4a",
|
|
15
|
-
"itemId": "Home Videos/interview.m4a",
|
|
16
|
-
"media": "audio",
|
|
17
|
-
"size": 8388608,
|
|
18
|
-
"modified": 1795748400
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-folder-skips-subtitles.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"slot": "library",
|
|
3
|
-
"call": "list",
|
|
4
|
-
"args": [
|
|
5
|
-
"电影"
|
|
6
|
-
],
|
|
7
|
-
"exchanges": [],
|
|
8
|
-
"output": {
|
|
9
|
-
"entries": [
|
|
10
|
-
{
|
|
11
|
-
"type": "file",
|
|
12
|
-
"path": "电影/Big Buck Bunny (2008).mkv",
|
|
13
|
-
"name": "Big Buck Bunny (2008).mkv",
|
|
14
|
-
"itemId": "电影/Big Buck Bunny (2008).mkv",
|
|
15
|
-
"media": "video",
|
|
16
|
-
"size": 734003200,
|
|
17
|
-
"modified": 1795748400
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
}
|
package/skill/krillplayer-plugin/assets/samples/file-share/cases/library-root-first-page.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"slot": "library",
|
|
3
|
-
"call": "list",
|
|
4
|
-
"args": [
|
|
5
|
-
""
|
|
6
|
-
],
|
|
7
|
-
"exchanges": [],
|
|
8
|
-
"output": {
|
|
9
|
-
"entries": [
|
|
10
|
-
{
|
|
11
|
-
"type": "directory",
|
|
12
|
-
"path": "Home Videos",
|
|
13
|
-
"name": "Home Videos",
|
|
14
|
-
"modified": 1795748400
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"type": "directory",
|
|
18
|
-
"path": "电影",
|
|
19
|
-
"name": "电影",
|
|
20
|
-
"modified": 1795748400
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"next": "2"
|
|
24
|
-
}
|
|
25
|
-
}
|