nyaasi: don't add S01 to releases that contain only episode number (#14267)

This commit is contained in:
Bogdan
2023-04-23 16:57:09 +03:00
committed by GitHub
parent d7db1f924c
commit 2318ded9af

View File

@@ -189,8 +189,6 @@ search:
args: ["(?i)\\b(S\\d+(?:-\\d+)?) - (\\d+)\\b", "$1E$2"] args: ["(?i)\\b(S\\d+(?:-\\d+)?) - (\\d+)\\b", "$1E$2"]
- name: re_replace - name: re_replace
args: ["(?i)\\b(.+? - )(\\d+)([\\s\\-~\\+àa&]+)(\\d+) ([\\[\\(])\\b", "$1S01E$2-$4 - $2$3$4 $5"] args: ["(?i)\\b(.+? - )(\\d+)([\\s\\-~\\+àa&]+)(\\d+) ([\\[\\(])\\b", "$1S01E$2-$4 - $2$3$4 $5"]
- name: re_replace
args: ["(?i)\\b(.+? - )(\\d+) ([\\[\\(])\\b", "$1S01E$2 - $2 $3"]
- name: re_replace - name: re_replace
args: ["(?i)\\b(?:S\\s|Seasons?\\s?)(\\d+(?:-\\d+)?)\\b(?!(?:-\\d+)?\\s(?:EP|Episodes?)?\\s?(?:\\d+(?:-\\d+)?)?\\s?S\\d+(?:E\\d+(?:-\\d+)?)?)", "$0 S$1"] args: ["(?i)\\b(?:S\\s|Seasons?\\s?)(\\d+(?:-\\d+)?)\\b(?!(?:-\\d+)?\\s(?:EP|Episodes?)?\\s?(?:\\d+(?:-\\d+)?)?\\s?S\\d+(?:E\\d+(?:-\\d+)?)?)", "$0 S$1"]
- name: re_replace - name: re_replace
@@ -202,11 +200,18 @@ search:
args: "(?i)(S\\d{1,3}(E\\d+)?)" args: "(?i)(S\\d{1,3}(E\\d+)?)"
- name: append - name: append
args: "NULL" args: "NULL"
title_has_episode:
text: "{{ .Result.title_optional }}"
filters:
- name: regexp
args: "\\b(.+? - ?)(\\d+) ([\\[\\(])\\b"
- name: append
args: "NULL"
title: title:
text: "{{ .Result.title_optional }}" text: "{{ .Result.title_optional }}"
filters: filters:
- name: append - name: append
args: "{{ if and (eq .Result.category_group_id \"1\") (eq .Result.title_has_season \"NULL\") }} S01{{ else }}{{ end }}" args: "{{ if and (eq .Result.category_group_id \"1\") (and (eq .Result.title_has_season \"NULL\") (eq .Result.title_has_episode \"NULL\")) }} S01{{ else }}{{ end }}"
details: details:
selector: td:nth-child(2) a:last-of-type selector: td:nth-child(2) a:last-of-type
attribute: href attribute: href