mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-29 19:36:36 +08:00
65d1ad5ae5
优化番号处理逻辑,添加对MetaTube的支持
118 lines
3.9 KiB
TypeScript
118 lines
3.9 KiB
TypeScript
import type { SettingGroup } from './settingsGroupTypes'
|
||
|
||
export const adultSettingsGroup: SettingGroup = {
|
||
key: 'adult',
|
||
label: 'Adult / NSFW',
|
||
description: '成人内容隔离与番号刮削配置 (支持 MetaTube 服务端与内置多源)',
|
||
items: [
|
||
{
|
||
key: 'adult.enabled',
|
||
label: '启用成人内容',
|
||
type: 'toggle',
|
||
hint: '全局开关。关闭后所有人都无法显示成人库;开启后用户仍默认隐藏,可在个人资料或 Bot 中自行显示。',
|
||
defaultValue: 'true',
|
||
},
|
||
{
|
||
key: 'adult.library_ids',
|
||
label: '指定成人媒体库',
|
||
type: 'library-multiselect',
|
||
hint: '管理员指定哪些媒体库目录属于成人影视库。指定后网页、搜索和第三方客户端都会统一隐藏。',
|
||
defaultValue: '[]',
|
||
},
|
||
{
|
||
key: 'adult.require_pin',
|
||
label: '访问需要 PIN',
|
||
type: 'toggle',
|
||
},
|
||
{
|
||
key: 'adult.pin',
|
||
label: 'PIN 码',
|
||
type: 'text',
|
||
hint: '4-8 位数字',
|
||
},
|
||
{
|
||
key: 'adult.scraper.engine',
|
||
label: '番号刮削引擎',
|
||
type: 'select',
|
||
hint: '选择使用内置刮削源、MetaTube 独立服务端或智能混合模式',
|
||
defaultValue: 'builtin',
|
||
options: [
|
||
{ value: 'builtin', label: '本项目内置刮削 (JavDB / JavBus 多源)' },
|
||
{ value: 'metatube', label: 'MetaTube 后端服务 (推荐)' },
|
||
{ value: 'auto', label: '智能混合 (优先 MetaTube,失败回退内置)' },
|
||
],
|
||
},
|
||
{
|
||
key: 'adult.scraper.metatube_server',
|
||
label: 'MetaTube 服务端地址',
|
||
type: 'text',
|
||
placeholder: 'http://127.0.0.1:7700',
|
||
defaultValue: 'http://127.0.0.1:7700',
|
||
hint: 'MetaTube Server 服务端 URL(如 http://127.0.0.1:7700)',
|
||
},
|
||
{
|
||
key: 'adult.scraper.metatube_token',
|
||
label: 'MetaTube 访问 Token',
|
||
type: 'text',
|
||
placeholder: '留空表示无 Token 保护',
|
||
hint: 'MetaTube 服务端配置的 API Bearer Token',
|
||
},
|
||
{
|
||
key: 'adult.scraper.metatube_provider',
|
||
label: 'MetaTube 首选 Provider',
|
||
type: 'text',
|
||
placeholder: '例如 javdb, javbus, dmm, fc2, gfriends (留空为全部)',
|
||
hint: '指定首选或默认查询的 Provider 数据源',
|
||
},
|
||
{
|
||
key: 'adult.scraper.enable_actor',
|
||
label: '刮削女优/演员详情与头像',
|
||
type: 'toggle',
|
||
defaultValue: 'true',
|
||
hint: '自动刮削女优简介、三围、生日及头像,并整合至标签',
|
||
},
|
||
{
|
||
key: 'adult.scraper.enable_trailer',
|
||
label: '刮削预告片',
|
||
type: 'toggle',
|
||
defaultValue: 'false',
|
||
hint: '自动抓取影片的预告片/试看片段链接',
|
||
},
|
||
{
|
||
key: 'adult.scraper.crop_cover',
|
||
label: '封面智能裁剪海报',
|
||
type: 'toggle',
|
||
defaultValue: 'true',
|
||
hint: '将宽版 DVD 封套大图智能裁剪为竖版正面海报,并保留完整封套作为背景大图',
|
||
},
|
||
{
|
||
key: 'adult.scraper.badge',
|
||
label: '添加无码/角标标记',
|
||
type: 'toggle',
|
||
defaultValue: 'false',
|
||
hint: '为识别出的无码/破解作品在海报添加角标标记',
|
||
},
|
||
{
|
||
key: 'adult.scraper.builtin_javdb_url',
|
||
label: '内置 JavDB 地址',
|
||
type: 'text',
|
||
placeholder: 'https://javdb.com',
|
||
defaultValue: 'https://javdb.com',
|
||
},
|
||
{
|
||
key: 'adult.scraper.builtin_javbus_url',
|
||
label: '内置 JavBus 镜像列表',
|
||
type: 'textarea',
|
||
placeholder: 'https://javbus.sbs\nhttps://www.javbus.com\nhttps://www.cdnbus.cyou',
|
||
defaultValue: 'https://javbus.sbs,https://www.javbus.com,https://www.cdnbus.cyou,https://www.javsee.cyou,https://www.busjav.cyou',
|
||
},
|
||
{
|
||
key: 'adult.scraper.builtin_cookie',
|
||
label: '内置源年龄验证 Cookie',
|
||
type: 'text',
|
||
placeholder: 'age=verified; existmag=all',
|
||
defaultValue: 'age=verified; existmag=all',
|
||
},
|
||
],
|
||
}
|