forked from drdon1234/astrbot_plugin_media_parser
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_conf_schema.json
More file actions
186 lines (186 loc) · 7.24 KB
/
Copy path_conf_schema.json
File metadata and controls
186 lines (186 loc) · 7.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
{
"is_auto_pack": {
"description": "是否将解析结果打包为消息集合",
"type": "bool",
"hint": "Napcat 对打包消息的实现有 BUG,不建议使用",
"default": false
},
"trigger_settings": {
"description": "触发设置",
"type": "object",
"items": {
"is_auto_parse": {
"description": "是否自动解析链接",
"type": "bool",
"default": true
},
"trigger_keywords": {
"description": "手动触发解析的关键词列表",
"type": "list",
"hint": "当禁用'是否自动解析视频链接'时,消息头使用这些关键词才会触发解析",
"default": ["视频解析", "解析视频"]
}
}
},
"whitelist": {
"description": "白名单设置",
"type": "object",
"items": {
"enable": {
"description": "是否启用白名单",
"type": "bool",
"hint": "启用后,只有白名单中的用户或群组才能触发解析",
"default": false
},
"user": {
"description": "用户白名单",
"type": "list",
"hint": "允许触发解析的用户ID列表",
"default": []
},
"group": {
"description": "群组白名单",
"type": "list",
"hint": "允许触发解析的群组ID列表",
"default": []
}
}
},
"video_size_settings": {
"description": "视频大小设置",
"type": "object",
"items": {
"max_video_size_mb": {
"description": "最大允许发送的视频大小(MB)",
"type": "float",
"hint": "超过此大小的视频将被跳过,不下载也不发送。设置为0表示不限制",
"default": 500.0
},
"large_video_threshold_mb": {
"description": "大视频阈值(MB)",
"type": "float",
"hint": "当视频大小超过此阈值时,将下载到缓存目录。视频会单独发送而不包含在转发消息集合中。不能超过消息适配器100MB硬性阈值。设置为0表示不限制",
"default": 100.0
}
}
},
"download_settings": {
"description": "下载和缓存设置",
"type": "object",
"items": {
"cache_dir": {
"description": "媒体缓存目录",
"type": "string",
"hint": "媒体文件缓存目录,用于Twitter视频和所有超过阈值的大视频,默认值是 docker 专用,请修改为部署平台对应的路径格式",
"default": "/app/sharedFolder/video_parser/cache"
},
"pre_download_all_media": {
"description": "是否预先下载所有媒体到本地",
"type": "bool",
"hint": "启用后,所有媒体文件将并发下载到缓存目录,发送时使用本地路径。可以提高发送成功率,减少总下载时间,但会短时间增加磁盘占用",
"default": false
},
"max_concurrent_downloads": {
"description": "最大并发下载数",
"type": "int",
"hint": "当启用预先下载所有媒体到本地时,同时下载的媒体文件数量上限。建议值:3-5",
"default": 5
}
}
},
"parser_enable_settings": {
"description": "解析器启用设置",
"type": "object",
"items": {
"enable_bilibili": {
"description": "是否启用B站解析器",
"type": "bool",
"default": true
},
"enable_douyin": {
"description": "是否启用抖音解析器",
"type": "bool",
"default": true
},
"enable_kuaishou": {
"description": "是否启用快手解析器",
"type": "bool",
"default": true
},
"enable_weibo": {
"description": "是否启用微博解析器",
"type": "bool",
"default": true
},
"enable_xiaohongshu": {
"description": "是否启用小红书解析器",
"type": "bool",
"default": true
},
"enable_xiaoheihe": {
"description": "是否启用小黑盒解析器",
"type": "bool",
"default": true
},
"enable_twitter": {
"description": "是否启用Twitter/X解析器",
"type": "bool",
"default": true
}
}
},
"proxy_settings": {
"description": "代理设置",
"type": "object",
"items": {
"proxy_addr": {
"description": "全局代理地址",
"type": "string",
"hint": "代理地址格式:http://host:port 或 socks5://host:port。所有解析器共用此代理地址",
"default": ""
},
"xiaoheihe": {
"description": "小黑盒代理设置",
"type": "object",
"items": {
"video": {
"description": "小黑盒视频下载是否使用代理",
"type": "bool",
"hint": "启用后,小黑盒视频下载将通过代理进行",
"default": true
}
}
},
"twitter": {
"description": "Twitter代理设置",
"type": "object",
"items": {
"parse": {
"description": "Twitter解析是否使用代理",
"type": "bool",
"hint": "启用后,Twitter API请求将通过代理进行",
"default": false
},
"image": {
"description": "Twitter图片下载是否使用代理",
"type": "bool",
"hint": "启用后,Twitter图片下载将通过代理进行。图片CDN大多被墙,建议开启以提升成功率",
"default": true
},
"video": {
"description": "Twitter视频下载是否使用代理",
"type": "bool",
"hint": "启用后,Twitter视频下载将通过代理进行。视频CDN几乎不受影响,通常无需开启以节约流量",
"default": true
}
}
}
}
},
"debug": {
"description": "是否启用Debug模式",
"type": "bool",
"hint": "启用后,将使用debug级日志记录完整工作流的详细日志(从解析开始到发送完毕)",
"default": false
}
}