From 5cca3cdacf47670883b4347ad50482445f879317 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Sat, 23 Jul 2022 07:12:53 +1200 Subject: [PATCH] 52pt: add douban query support --- src/Jackett.Common/Definitions/52pt.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Jackett.Common/Definitions/52pt.yml b/src/Jackett.Common/Definitions/52pt.yml index 03b9ff486..3ad95aece 100644 --- a/src/Jackett.Common/Definitions/52pt.yml +++ b/src/Jackett.Common/Definitions/52pt.yml @@ -24,8 +24,8 @@ caps: modes: search: [q] - tv-search: [q, season, ep, imdbid] - movie-search: [q, imdbid] + tv-search: [q, season, ep, imdbid, doubanid] + movie-search: [q, imdbid, doubanid] music-search: [q] settings: @@ -77,17 +77,18 @@ search: - path: torrents.php inputs: $raw: "{{ range .Categories }}cat{{.}}=1&{{end}}" - search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}" + search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ end }}{{ if .Query.DoubanID }}/{{ .Query.DoubanID }}{{ else }}{{ end }}{{ if or .Query.IMDBID .Query.DoubanID }}{{ else }}{{ .Keywords }}{{ end }}" # 0 incldead, 1 active, 2 dead incldead: 0 # 0 all, 1 normal, 2 free, 3 2x, 4 2xfree, 5 50%, 6 2x50%, 7 30% spstate: "{{ if .Config.freeleech }}2{{ else }}0{{ end }}" # 0 title, 1 descr, 3 uploader, 4 imdburl - search_area: "{{ if .Query.IMDBID }}4{{ else }}0{{ end }}" + search_area: "{{ if .Query.IMDBID }}4{{ else }}{{ end }}{{ if .Query.DoubanID }}1{{ else }}{{ end }}{{ if or .Query.IMDBID .Query.DoubanID }}{{ else }}0{{ end }}" # 0 AND, 1 OR, 2 exact search_mode: 0 sort: "{{ .Config.sort }}" type: "{{ .Config.type }}" + # does not return imdb or doubanid in results rows: selector: table.torrents > tbody > tr:has(table.torrentname) @@ -113,9 +114,6 @@ search: download: selector: a[href^="download.php?id="] attribute: href - imdbid: - selector: div.imdb_100 > a - attribute: href date_elapsed: # time type: time elapsed (default) selector: td:nth-child(4) > span[title]