filmsclub: massage TV titles for sonarr. #7289

This commit is contained in:
Garfield69 2020-03-05 13:32:31 +13:00
parent 6634c5a036
commit bd1d95ade5
1 changed files with 14 additions and 7 deletions

View File

@ -92,21 +92,28 @@
title_with_year: title_with_year:
selector: a[href^="/torrent/"] selector: a[href^="/torrent/"]
filters: filters:
# try to reorder TV title for Sonarr: name year source quality season/episode -> name year season/episode source quality
- name: re_replace
args: ["[\\:\\-\\/\\|,\\s]", " "]
- name: re_replace
args: ["(.*)(\\([1|2][0-9]{3}\\))(.*)([CСcс]езон.*)", "$1$2$4$3"]
# normalize to SXXEYY format # normalize to SXXEYY format
- name: re_replace - name: re_replace
args: ["[\\:\\-\\/\\|]", " "] args: ["(.*)[CСcс]езон +(\\d+).+[CСcс]ери[ия] +(\\d+) +(\\d+) +из +\\d+(.*)", "$1 S$2E$3-$4 rus $5"]
- name: re_replace - name: re_replace
args: ["(.*)[CСcс]езон\\s+(\\d+).+[CСcс]ери[ия]\\s+(\\d+)\\s+(\\d+).+(.*)", "$1 S$2E$3-$4 rus $5"] args: ["(.*)[CСcс]езон +(\\d+)(.*)", "$1 S$2 rus $3"]
- name: re_replace
args: ["(.*)[CСcс]езон\\s+(\\d+)(.*)", "$1 S$2 rus $3"]
- name: re_replace - name: re_replace
args: ["(\\([А-Яа-яЁё\\W]+\\))|(^[А-Яа-яЁё\\W\\d]+\\/ )|([а-яА-ЯЁё \\-]+,+)|([а-яА-ЯЁё]+)", "{{ if .Config.striprussian }}{{ else }}$1$2$3$4{{ end }}"] args: ["(\\([А-Яа-яЁё\\W]+\\))|(^[А-Яа-яЁё\\W\\d]+\\/ )|([а-яА-ЯЁё \\-]+,+)|([а-яА-ЯЁё]+)", "{{ if .Config.striprussian }}{{ else }}$1$2$3$4{{ end }}"]
- name: replace - name: replace
args: [" Rip", "Rip"] args: [" Rip", "Rip"]
- name: replace
args: ["Blu Ray", "Bluray"]
- name: replace - name: replace
args: ["WEB DL", "WEBDL"] args: ["WEB DL", "WEBDL"]
- name: replace - name: replace
args: ["WEBDLRip", "WEBDL"] args: ["WEBDLRip", "WEBDL"]
- name: replace
args: ["WEBRip", "WEBDL"]
- name: replace - name: replace
args: ["HDTVRip", "HDTV"] args: ["HDTVRip", "HDTV"]
title_without_year: title_without_year: