1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-03-10 06:03:09 +00:00

sharewood: improve regular expressions for title (#13927)

This commit is contained in:
Bogdan 2023-01-24 21:05:44 +02:00 committed by GitHub
parent 4b9c1afc2a
commit 059d46a715
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,22 +146,22 @@ search:
args: "/img/NewIcones/(.+?).png" args: "/img/NewIcones/(.+?).png"
title_phase1: title_phase1:
selector: a.view-torrent selector: a.view-torrent
title_multilang: title_vostfr:
text: "{{ .Result.title_phase1 }}" text: "{{ .Result.title_phase1 }}"
filters: filters:
- name: re_replace - name: re_replace
args: ["(?i)(\\smulti\\s)", " {{ .Config.multilanguage }} "] args: ["(?i)\\b(VOSTFR)\\b", "ENGLISH"]
- name: re_replace
args: ["(?i)\\b(SUBFRENCH)\\b", "ENGLISH"]
title_phase2: title_phase2:
text: "{{ if .Config.multilang }}{{ .Result.title_multilang }}{{ else }}{{ .Result.title_phase1 }}{{ end }}" text: "{{ if .Config.vostfr }}{{ .Result.title_vostfr }}{{ else }}{{ .Result.title_phase1 }}{{ end }}"
title_vostfr: title_multilang:
text: "{{ .Result.title_phase2 }}" text: "{{ .Result.title_phase2 }}"
filters: filters:
- name: re_replace - name: re_replace
args: ["(?i)(\\svostfr\\s)", " ENGLISH "] args: ["(?i)\\b(MULTI(?!.*(?:FRENCH|ENGLISH|VOSTFR)))\\b", "{{ .Config.multilanguage }}"]
- name: re_replace
args: ["(?i)(\\ssubfrench\\s)", " ENGLISH "]
title: title:
text: "{{ if .Config.vostfr }}{{ .Result.title_vostfr }}{{ else }}{{ .Result.title_phase2 }}{{ end }}" text: "{{ if .Config.multilang }}{{ .Result.title_multilang }}{{ else }}{{ .Result.title_phase2 }}{{ end }}"
download: download:
selector: a.view-torrent selector: a.view-torrent
attribute: href attribute: href