Added option to normalize release name

This commit is contained in:
Khogniak 2017-08-22 17:31:13 +02:00 committed by kaso17
parent 947dbac485
commit 01b30b0743
1 changed files with 21 additions and 1 deletions

View File

@ -43,6 +43,10 @@
- name: password
type: password
label: Password
- name: filter_title
type: checkbox
label: Try to normalize releases names by moving year after the title
default: false
login:
path: "/user/login"
method: post
@ -93,8 +97,24 @@
args: [ " an", " year"]
- name: append
args: " ago"
title:
title_normal:
selector: "a.torrent-name"
title_filtered:
selector: "a.torrent-name"
filters:
- name: tolower
- name: re_replace
args: ["^(?:(.+?)((?:[\\.\\-\\s_\\[]+(?:imax|(?:dvd|bd|tv)(?:rip|scr)|bluray(?:\\-?rip)?|720\\s*p?|1080\\s*p?|vof?|vost(?:fr)?|multi|vf(?:f|q)?[1-3]?[1-3]?|(?:true)?french|eng?)[\\.\\-\\s_\\]]*)*)([\\(\\[]?(?:20|1[7-9])\\d{2}[\\)\\]]?)(.*)$|(.*))$", "$1 $3 $2 $4 $5"]
- name: replace
args: [".", " "]
- name: trim
- name: re_replace
args: ["\\s(mkv|avi|divx|xvid|mp4)$", ""]
- name: re_replace
args: ["(\\s{2,5})", " "]
- name: trim
title:
text: "{{if .Config.filter_title }}{{ .Result.title_filtered }}{{else}}{{ .Result.title_normal }}{{end}}"
details:
selector: "a.torrent-name"
attribute: href