Skip to content

Commit

Permalink
feat(route): javdb actors addon_tags (#16336)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgpublic authored Aug 2, 2024
1 parent 896d2c7 commit 45818f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/routes/javdb/actors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
'': '',
Expand Down

0 comments on commit 45818f4

Please sign in to comment.