bitru: add title filters (#13149)

This commit is contained in:
Ilya Pavlov
2022-04-15 08:00:26 +03:00
committed by GitHub
parent 08b279a0bc
commit 688c62ea07

View File

@@ -31,6 +31,14 @@ caps:
book-search: [q]
settings:
- name: striprussian
type: checkbox
label: Strip Russian Letters
default: false
- name: addrussian
type: checkbox
label: Add RUSSIAN to end of all titles to improve language detection by Sonarr and Radarr. Will cause English-only results to be misidentified.
default: false
- name: adverts
type: checkbox
label: Include Advertising
@@ -64,6 +72,23 @@ search:
args: tmp
title:
selector: a[href^="details.php?id="]
filters:
- name: replace
args: ["селезень", "selezen"]
- name: re_replace
args: ["(\\([А-Яа-яЁё\\W]+\\))|(^[А-Яа-яЁё\\W\\d]+\\/ )|([а-яА-ЯЁё \\-]+,+)|([а-яА-ЯЁё]+)", "{{ if .Config.striprussian }}{{ else }}$1$2$3$4{{ end }}"]
- name: re_replace
args: ["[\\:\\-\\/\\|\\[\\]]", " "]
- name: append
args: "{{ if .Config.addrussian }} - RUSSIAN{{ else }}{{ end }}"
- name: replace
args: [" Rip", "Rip"]
- name: replace
args: ["WEB DL", "WEBDL"]
- name: replace
args: ["WEBDLRip", "WEBDL"]
- name: replace
args: ["HDTVRip", "HDTV"]
details:
selector: a[href^="details.php?id="]
attribute: href