Skip to content

Commit

Permalink
elitetorrentbiz: rework processing. resolves #8778
Browse files Browse the repository at this point in the history
handle missing category, default to Other.
try to fetch the quality, language, and massage it all into a title more useful than before.
  • Loading branch information
garfield69 committed Sep 15, 2020
1 parent 562f9f4 commit b065959
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions src/Jackett.Common/Definitions/elitetorrent-biz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ caps:
categories:
"series": TV
"peliculas": Movies
"other": Other

modes:
search: [q]
Expand All @@ -48,9 +49,9 @@ search:
keywordsfilters:
# most ES/ITA TV torrents are in XXxYY format, so we search without S/E prefixes and filter later
- name: re_replace
args: ["S0?(\\d{1,2})", " $1 "]
args: ["(?i)S0?(\\d{1,2})", " $1 "]
- name: re_replace
args: ["E(\\d{2,3})", " $1 "]
args: ["(?i)E(\\d{2,3})", " $1 "]
inputs:
s: "{{ .Keywords }}"
$raw: "&x=0&y=0"
Expand All @@ -61,19 +62,40 @@ search:
- name: andmatch

fields:
title:
selector: .meta a
attribute: href
quality:
selector: span:nth-of-type(2) > i
filters:
- name: replace
args: ["---", ""]
language:
selector: span#idiomacio > i > img
attribute: title
filters:
- name: replace
args: ["Pelicula en ", ""]
- name: replace
args: ["Español", "Spanish"]
- name: replace
args: ["Ingles", "English"]
- name: replace
args: ["Subtitulado", "Subtitled"]
_title:
selector: div.imagen > a
attribute: title
# normalize to SXXEYY format
filters:
- name: re_replace
args: [".*/([^/]*)/$", "$1"]
- name: replace
args: ["-", " "]
args: [" – ", " "]
- name: replace
args: ["(", ""]
- name: replace
args: [")", ""]
- name: re_replace
args: ["(\\d{2})×(\\d{2})", "S$1E$2"]
- name: re_replace
args: ["(\\d{1})×(\\d{2})", "S0$1E$2"]
title:
text: "{{ .Result._title}} {{ .Result.quality }} {{ .Result.language }}"
details:
selector: .meta a
attribute: href
Expand All @@ -96,7 +118,7 @@ search:
- name: regexp
args: "^.*/(series)/.*$"
category:
text: "{{ if or .Result.category_movie .Result.category_tv }}{{ or .Result.category_movie .Result.category_tv }}{{ else }}{{ end }}"
text: "{{ if or .Result.category_movie .Result.category_tv }}{{ or .Result.category_movie .Result.category_tv }}{{ else }}other{{ end }}"
size:
text: "0 B"
size:
Expand Down

0 comments on commit b065959

Please sign in to comment.