Skip to content

Commit

Permalink
jackett indexers as of 5b6b8d869740cc268ba96f77a7fc46c036b477f8
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameisbogdan committed Apr 30, 2023
1 parent e3ba9a4 commit e9b1c6d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
22 changes: 15 additions & 7 deletions definitions/v7/nyaasi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ settings:
type: checkbox
label: Prefer Magnet Links
default: true
- name: sonarr_compatibility
type: checkbox
label: Improve Sonarr compatibility by trying to add Season information into Release Titles
default: false
- name: filter-id
type: select
label: Filter
Expand Down Expand Up @@ -154,14 +158,16 @@ search:
args: ["_", 0]
title_default:
selector: td:nth-child(2) a:last-of-type
title_spanish:
title_phase1:
selector: td:nth-child(2) a:last-of-type:contains("[PuyaSubs!] ")
optional: true
filters:
- name: append
args: " Spanish"
title_optional:
text: "{{ or (.Result.title_spanish) (.Result.title_default) }}"
title_phase2:
text: "{{ or (.Result.title_phase1) (.Result.title_default) }}"
title_phase3:
text: "{{ .Result.title_phase2 }}"
filters:
- name: re_replace
args: ["(?i)\\b((?:S|Seasons?|EP?|Episodes?)\\s?)(\\d+)(?:\\-|[\\s~\\+àa&]+)(\\d+)\\b", "$1$2-$3"]
Expand Down Expand Up @@ -192,24 +198,26 @@ search:
- 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 }}"
text: "{{ .Result.title_phase3 }}"
filters:
- name: regexp
args: "(?i)(S\\d{1,3}(E\\d+)?)"
- name: append
args: "NULL"
title_has_episode:
text: "{{ .Result.title_optional }}"
text: "{{ .Result.title_phase3 }}"
filters:
- name: regexp
args: "\\b(.+? - ?)(\\d+) ([\\[\\(])\\b"
- name: append
args: "NULL"
title:
text: "{{ .Result.title_optional }}"
title_optional:
text: "{{ .Result.title_phase3 }}"
filters:
- name: append
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 }}"
title:
text: "{{ if .Config.sonarr_compatibility }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_phase2 }}{{ end }}"
details:
selector: td:nth-child(2) a:last-of-type
attribute: href
Expand Down
22 changes: 15 additions & 7 deletions definitions/v9/nyaasi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ settings:
type: checkbox
label: Prefer Magnet Links
default: true
- name: sonarr_compatibility
type: checkbox
label: Improve Sonarr compatibility by trying to add Season information into Release Titles
default: false
- name: filter-id
type: select
label: Filter
Expand Down Expand Up @@ -154,14 +158,16 @@ search:
args: ["_", 0]
title_default:
selector: td:nth-child(2) a:last-of-type
title_spanish:
title_phase1:
selector: td:nth-child(2) a:last-of-type:contains("[PuyaSubs!] ")
optional: true
filters:
- name: append
args: " Spanish"
title_optional:
text: "{{ or (.Result.title_spanish) (.Result.title_default) }}"
title_phase2:
text: "{{ or (.Result.title_phase1) (.Result.title_default) }}"
title_phase3:
text: "{{ .Result.title_phase2 }}"
filters:
- name: re_replace
args: ["(?i)\\b((?:S|Seasons?|EP?|Episodes?)\\s?)(\\d+)(?:\\-|[\\s~\\+àa&]+)(\\d+)\\b", "$1$2-$3"]
Expand Down Expand Up @@ -192,24 +198,26 @@ search:
- 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 }}"
text: "{{ .Result.title_phase3 }}"
filters:
- name: regexp
args: "(?i)(S\\d{1,3}(E\\d+)?)"
- name: append
args: "NULL"
title_has_episode:
text: "{{ .Result.title_optional }}"
text: "{{ .Result.title_phase3 }}"
filters:
- name: regexp
args: "\\b(.+? - ?)(\\d+) ([\\[\\(])\\b"
- name: append
args: "NULL"
title:
text: "{{ .Result.title_optional }}"
title_optional:
text: "{{ .Result.title_phase3 }}"
filters:
- name: append
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 }}"
title:
text: "{{ if .Config.sonarr_compatibility }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_phase2 }}{{ end }}"
details:
selector: td:nth-child(2) a:last-of-type
attribute: href
Expand Down

0 comments on commit e9b1c6d

Please sign in to comment.