From 9013b6adc65e52ead1ea635785d2986852a3b83e Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 31 Dec 2024 21:52:18 +0200 Subject: [PATCH] hhanclub: use episode number from description in titles --- src/Jackett.Common/Definitions/hhanclub.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Jackett.Common/Definitions/hhanclub.yml b/src/Jackett.Common/Definitions/hhanclub.yml index 186fde789..ba0c7d56c 100644 --- a/src/Jackett.Common/Definitions/hhanclub.yml +++ b/src/Jackett.Common/Definitions/hhanclub.yml @@ -114,6 +114,12 @@ search: selector: div.w-full:has(a[href^="details.php?id="]) fields: + _episode_number: + selector: div.torrent-title > div > div + optional: true + filters: + - name: regexp + args: "第(\\d+(?:-\\d+)?)集" category: selector: a[href^="?cat[]="] attribute: href @@ -122,6 +128,9 @@ search: args: cat[] title: selector: a[href^="details.php?id="] + filters: + - name: re_replace + args: ["\\b(S\\d+)\\b", "{{ if .Result._episode_number }}$1E{{ .Result._episode_number }}{{ else }}$1{{ end }}"] details: selector: a[href^="details.php?id="] attribute: href