diff --git a/src/Jackett.Common/Definitions/bitru.yml b/src/Jackett.Common/Definitions/bitru.yml index 5e97aa4e6..f642a2652 100644 --- a/src/Jackett.Common/Definitions/bitru.yml +++ b/src/Jackett.Common/Definitions/bitru.yml @@ -25,7 +25,7 @@ caps: modes: search: [q] - tv-search: [q] + tv-search: [q, season, ep] movie-search: [q] music-search: [q] book-search: [q] @@ -59,6 +59,9 @@ search: s: "{{ .Keywords }}" sort: "{{ re_replace .Config.sort \"_\" \"\" }}" $raw: "{{ if .Config.adverts }}{{ else }}&rek=no{{ end}}" + keywordsfilters: + - name: re_replace # S01 or S01E01 to 1 сезон + args: ["(?i)\\bS0*(\\d+)(?:E0*(\\d+))?\\b", "$1 сезон"] rows: selector: table.browse-list > tbody > tr @@ -76,15 +79,21 @@ search: - name: replace args: ["селезень", "selezen"] - name: re_replace - args: ["(\\([А-Яа-яЁё\\W]+\\))|(^[А-Яа-яЁё\\W\\d]+\\/ )|([а-яА-ЯЁё \\-]+,+)|([а-яА-ЯЁё]+)", "{{ if .Config.striprussian }}{{ else }}$1$2$3$4{{ end }}"] + args: ["(?:(\\d+-*\\d*)\\s+[Сс]езоны?:?)\\s+\\((\\d+-*\\d*).*[?\\d]+\\)(.*)(\\((?:[12][0-9]{3}-?){1,}\\))(.*)", "$3 - S$1E$2 - $4 $5"] - name: re_replace - args: ["[\\:\\-\\/\\|\\[\\]]", " "] + args: ["\\((\\d+-*\\d*).*[?\\d]+\\)(.*)(\\((?:[12][0-9]{3}-?){1,}\\))(.*)", "$2 - E$1 - $3 $4"] + - name: re_replace + args: ["(\\([А-Яа-яЁё\\W]+\\))|(^[А-Яа-яЁё\\W\\d]+\\/ )|([а-яА-ЯЁё \\-]+,+)|([а-яА-ЯЁё]+)", "{{ if .Config.striprussian }}{{ else }}$0{{ end }}"] + - name: re_replace + args: ["[!?.,:|\\[\\]\\/]", " "] + - name: re_replace + args: ["^\\s+-\\s+", " "] - name: append args: "{{ if .Config.addrussian }} - RUSSIAN{{ else }}{{ end }}" - name: replace - args: [" Rip", "Rip"] + args: ["-Rip", "Rip"] - name: replace - args: ["WEB DL", "WEBDL"] + args: ["WEB-DL", "WEBDL"] - name: replace args: ["WEBDLRip", "WEBDL"] - name: replace