From 02fcad2ead31ae9d76fcb03d95705156a4ea8e61 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 13 Dec 2024 16:57:01 +0200 Subject: [PATCH] hdforever: properly format titles --- src/Jackett.Common/Definitions/hdforever.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Jackett.Common/Definitions/hdforever.yml b/src/Jackett.Common/Definitions/hdforever.yml index 393d56382..d27ce74c2 100644 --- a/src/Jackett.Common/Definitions/hdforever.yml +++ b/src/Jackett.Common/Definitions/hdforever.yml @@ -133,16 +133,19 @@ search: args: "&usetoken=1" download: text: "{{ if .Config.usetoken }}{{ .Result.download_usetoken }}{{ else }}{{ .Result.download_regular }}{{ end }}" + _release_group: + selector: span.team_name + optional: true + filters: + - name: trim title_phase1: selector: div.group_info - remove: :scope > span, div.tags + remove: :scope > span.team_name, :scope > span:nth-child(2), div.tags, div.vote_controls, .add_bookmark, img filters: - name: replace - args: ["\n", ""] + args: ["\n", " "] - name: re_replace - args: ["^(.+) (.+)", "$2-$1"] - - name: replace - args: [" ", " "] + args: ["\\s+", " "] - name: replace args: ["Blu-Ray Original", "Complete.BluRay"] - name: replace @@ -236,6 +239,8 @@ search: args: [".VOF", ".FRENCH"] - name: replace args: [".VFQ.MULTI", ".MULTI.VFQ"] + - name: append + args: "{{ if .Result._release_group }}-{{ .Result._release_group }}{{ else }}{{ end }}" title_vostfr: text: "{{ .Result.title_phase1 }}" filters: