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
1 changed files with 8 additions and 8 deletions

View File

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