From 4f7a7a255724964a2f9bc7ca1aba2974642bdb2e Mon Sep 17 00:00:00 2001 From: SHL-COOL Date: Fri, 4 Oct 2024 18:29:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=20mergeSchemaTag?= =?UTF-8?q?Selectors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/background/searcher.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/background/searcher.ts b/src/background/searcher.ts index 0335553ab..1ed3258ca 100644 --- a/src/background/searcher.ts +++ b/src/background/searcher.ts @@ -118,9 +118,12 @@ export class Searcher { if (siteService.options.torrentTagSelectors) { // 是否合并 Schema 的标签选择器 if (siteService.options.mergeSchemaTagSelectors) { - searchConfig.torrentTagSelectors = siteService.options.torrentTagSelectors.concat( - searchConfig.torrentTagSelectors - ); + searchConfig.torrentTagSelectors = [ + ...new Map([ + ...(searchConfig.torrentTagSelectors ?? []), + ...siteService.options.torrentTagSelectors + ].map(item => [item.name, item])).values() + ]; } else { searchConfig.torrentTagSelectors = siteService.options.torrentTagSelectors; From d82008086c8481d10c1274acace79f69d3553778 Mon Sep 17 00:00:00 2001 From: SHL-COOL Date: Fri, 4 Oct 2024 18:34:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(keepfrds):=E5=A2=9E=E5=8A=A02xUp?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sites/pt.keepfrds.com/config.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resource/sites/pt.keepfrds.com/config.json b/resource/sites/pt.keepfrds.com/config.json index d866c3694..f05491af5 100644 --- a/resource/sites/pt.keepfrds.com/config.json +++ b/resource/sites/pt.keepfrds.com/config.json @@ -235,5 +235,8 @@ "name": "Neutral", "selector": "img.pro_nl", "color": "purple" + },{ + "name": "2xUp", + "selector": "img.pro_2up" }] }