assorted: optionally add russian tag to titles. resolves #12710 (#12713)

This commit is contained in:
ilike2burnthing 2021-12-18 04:52:15 +00:00 committed by GitHub
parent 9c18d2595f
commit 584345480b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 0 deletions

View File

@ -17,6 +17,10 @@ settings:
type: checkbox
label: Strip Russian Letters
default: true
- 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: sort
type: select
label: Sort requested from site
@ -797,6 +801,11 @@ search:
filters:
- name: querystring
args: f
title_is_rus:
selector: a[href^="viewtopic.php?t="] > b
filters:
- name: re_replace
args: ["[^А-Яа-яЁё]+", ""]
title:
selector: a[href^="viewtopic.php?t="] > b
filters:
@ -818,6 +827,10 @@ search:
args: ["WEBDLRip", "WEBDL"]
- name: replace
args: ["HDTVRip", "HDTV"]
- name: append
args: "{{ if .Result.title_is_rus }} - RUSSIAN{{ else }}{{ end }}"
- name: re_replace
args: ["(.+?) - RUSSIAN", "{{ if .Config.addrussian }}$1 - RUSSIAN{{ else }}$1{{ end }}"]
details:
selector: a[href^="viewtopic.php?t="]
attribute: href

View File

@ -23,6 +23,10 @@ settings:
type: checkbox
label: Strip Russian Letters
default: true
- 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: sort
type: select
label: Sort requested from site
@ -822,6 +826,11 @@ search:
filters:
- name: querystring
args: f
title_is_rus:
selector: a[href^="viewtopic.php?t="] > b
filters:
- name: re_replace
args: ["[^А-Яа-яЁё]+", ""]
title:
selector: a[href^="viewtopic.php?t="] > b
filters:
@ -843,6 +852,10 @@ search:
args: ["WEBDLRip", "WEBDL"]
- name: replace
args: ["HDTVRip", "HDTV"]
- name: append
args: "{{ if .Result.title_is_rus }} - RUSSIAN{{ else }}{{ end }}"
- name: re_replace
args: ["(.+?) - RUSSIAN", "{{ if .Config.addrussian }}$1 - RUSSIAN{{ else }}$1{{ end }}"]
details:
selector: a[href^="viewtopic.php?t="]
attribute: href

View File

@ -41,6 +41,10 @@ caps:
music-search: [q]
settings:
- 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: info
type: info
label: A note about RuTor
@ -70,6 +74,11 @@ search:
fields:
category:
text: 3
title_is_rus:
selector: td:nth-of-type(2) a[href^="/torrent/"]
filters:
- name: re_replace
args: ["[^А-Яа-яЁё]+", ""]
title:
selector: td:nth-of-type(2) a[href^="/torrent/"]
filters:
@ -79,6 +88,10 @@ search:
args: ["E -", "E01-99 -"]
- name: replace
args: ["Кураж-Бамбей", "kurazh"]
- name: append
args: "{{ if .Result.title_is_rus }} - RUSSIAN{{ else }}{{ end }}"
- name: re_replace
args: ["(.+?) - RUSSIAN", "{{ if .Config.addrussian }}$1 - RUSSIAN{{ else }}$1{{ end }}"]
details:
selector: td:nth-of-type(2) a[href^="/torrent/"]
attribute: href