diff --git a/src/Jackett/Definitions/yggtorrent.yml b/src/Jackett/Definitions/yggtorrent.yml index 7387e23d2..d87911340 100755 --- a/src/Jackett/Definitions/yggtorrent.yml +++ b/src/Jackett/Definitions/yggtorrent.yml @@ -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,23 @@ args: [ " an", " year"] - name: append args: " ago" - title: + title_normal: selector: "a.torrent-name" + title_filtered: + selector: "a.torrent-name" + filters: + - name: re_replace + args: ["(?i)^(?:(.+?)((?:[\\.\\-\\s_\\[]+(?:imax|(?:dvd|bd|tv)(?:rip|scr)|bluray(?:\\-?rip)?|720\\s*p?|1080\\s*p?|vof?|vost(?:fr)?|multi|vf(?:f|q)?[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: ["(?i)\\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