mirror of
https://github.com/Jackett/Jackett
synced 2025-03-04 18:59:01 +00:00
nyaasi: improve season and episode parsing (#14262)
Co-authored-by: Bogdan <mynameisbogdan@users.noreply.github.com>
This commit is contained in:
parent
f90fc34428
commit
9a65072e99
1 changed files with 27 additions and 7 deletions
|
@ -136,8 +136,6 @@ search:
|
|||
|
||||
rows:
|
||||
selector: tr.default,tr.danger,tr.success
|
||||
filters:
|
||||
- name: andmatch
|
||||
|
||||
fields:
|
||||
category:
|
||||
|
@ -166,22 +164,42 @@ search:
|
|||
text: "{{ or (.Result.title_spanish) (.Result.title_default) }}"
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["(?i)\\b(\\d{2,})(st|nd|rd|th) Season\\b", "$0 S$1"]
|
||||
args: ["(?i)\\b((?:S|Seasons?|EP?|Episodes?)\\s?)(\\d+)(?:\\-|[\\s~\\+àa&]+)(\\d+)\\b", "$1$2-$3"]
|
||||
- name: re_replace
|
||||
args: ["(?i)\\b(\\d)(st|nd|rd|th) Season\\b", "$0 S0$1"]
|
||||
args: ["(?i)\\b(?:S|Seasons?)\\s?(\\d+(?:-\\d+)?)[\\s\\-]+(?:EP|Episodes?)\\s?(\\d+(?:-\\d+)?)\\b", "$0 S$1E$2"]
|
||||
- name: re_replace
|
||||
args: ["(?i)\\bSeason (\\d{2,})\\b", "$0 S$1"]
|
||||
args: ["(?i)\\b(?:S|Seasons?)\\s?(\\d+(?:-\\d+)?)(?:.+?)(?:EP|Episodes?)\\s?(\\d+(?:-\\d+)?)\\b(?!(?:-\\d+)?\\sS\\d+(?:-\\d+)?E\\d+(?:-\\d+)?)", "$0 S$1E$2"]
|
||||
- name: re_replace
|
||||
args: ["(?i)\\bSeason (\\d)\\b", "$0 S0$1"]
|
||||
args: ["\\b (II) - (\\d+)[\\s\\-~\\+àa&]+(\\d+)", " $1 S02 - $2-$3"]
|
||||
- name: re_replace
|
||||
args: ["\\b (II) - (\\d+)", " $1 S02 - $2"]
|
||||
- name: re_replace
|
||||
args: ["\\b (III) - (\\d+)[\\s\\-~\\+àa&]+(\\d+)", " $1 S03 - $2-$3"]
|
||||
- name: re_replace
|
||||
args: ["\\b (III) - (\\d+)", " $1 S03 - $2"]
|
||||
- name: re_replace
|
||||
args: ["(?i)\\b(\\d+)(st|nd|rd|th) Season\\b", "$0 S$1"]
|
||||
- name: re_replace
|
||||
args: ["(?i)_(\\d+)(st|nd|rd|th)_season_(\\d+)_", "$0S$1E$3_"]
|
||||
- name: re_replace
|
||||
args: ["(?i)_(\\d+)(st|nd|rd|th)_season_", "$0S$1_"]
|
||||
- name: re_replace
|
||||
args: ["(?i)\\b(S\\d+(?:-\\d+)?) - (\\d+)[\\s\\-~\\+àa&]+(\\d+)\\b", "$1E$2-$3"]
|
||||
- name: re_replace
|
||||
args: ["(?i)\\b(S\\d+(?:-\\d+)?) - (\\d+)\\b", "$1E$2"]
|
||||
- name: re_replace
|
||||
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
|
||||
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
|
||||
args: ["(?i)\\b(?:EP|Episodes?)\\s?(\\d+(?:-\\d+)?)\\b(?!(?:-\\d+)?\\sS\\d+(?:-\\d+)?(?:E\\d+(?:-\\d+)?)?)", "$0 S01E$1"]
|
||||
title_has_season:
|
||||
text: "{{ .Result.title_optional }}"
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "(?i)\\b(S\\d{1,3}(E\\d+)?)\\b"
|
||||
args: "(?i)(S\\d{1,3}(E\\d+)?)"
|
||||
- name: append
|
||||
args: "NULL"
|
||||
title:
|
||||
|
@ -227,4 +245,6 @@ search:
|
|||
text: 0
|
||||
uploadvolumefactor:
|
||||
text: 1
|
||||
description:
|
||||
selector: td:nth-child(2) a:last-of-type
|
||||
# engine n/a
|
||||
|
|
Loading…
Add table
Reference in a new issue