From 45818f4e7bb375f99d2d72d169ba3f192f812150 Mon Sep 17 00:00:00 2001 From: Madray Haven Date: Fri, 2 Aug 2024 22:30:27 +0800 Subject: [PATCH] feat(route): javdb actors addon_tags (#16336) --- lib/routes/javdb/actors.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/routes/javdb/actors.ts b/lib/routes/javdb/actors.ts index a4bc97517..74e09f0f7 100644 --- a/lib/routes/javdb/actors.ts +++ b/lib/routes/javdb/actors.ts @@ -34,14 +34,18 @@ export const route: Route = { | ---- | ------ | -------- | ------ | ------ | | | p | s | d | c | - 所有演员编号参见 [演員庫](https://javdb.com/actors)`, + 所有演员编号参见 [演員庫](https://javdb.com/actors) + + 可用 addon_tags 参数添加额外的过滤 tag,可从网页 url 中获取,例如 \`/javdb/actors/R2Vg?addon_tags=212,18\` 可筛选 \`VR\` 和 \`中出\`。`, }; async function handler(ctx) { const id = ctx.req.param('id'); const filter = ctx.req.param('filter') ?? ''; + const addonTags = ctx.req.query('addon_tags') ?? ''; - const currentUrl = `/actors/${id}${filter ? `?t=${filter}` : ''}`; + const finalTags = addonTags && filter ? `${filter},${addonTags}` : `${filter}${addonTags}`; + const currentUrl = `/actors/${id}${finalTags ? `?t=${finalTags}` : ''}`; const filters = { '': '',