diff --git a/src/Jackett.Common/Definitions/btgigs.yml b/src/Jackett.Common/Definitions/btgigs.yml index 6962e7300..dc33a4270 100644 --- a/src/Jackett.Common/Definitions/btgigs.yml +++ b/src/Jackett.Common/Definitions/btgigs.yml @@ -7,6 +7,17 @@ encoding: ISO-8859-2 links: - https://btgigs.info/ + settings: + - name: username + type: text + label: Username + - name: password + type: password + label: Password + - name: lang + type: checkbox + label: Add POLISH to title if is in polish category + default: false caps: categorymappings: @@ -50,11 +61,13 @@ - selector: td.embedded:has(h2:contains("Error")) test: selector: a[href^="logout.php"] - path: browse.php - + path: index.php?news=1 + search: paths: - path: browse.php + error: + - selector: a.altlink inputs: $raw: "{{range .Categories}}c{{.}}=1&{{end}}" search: "{{ .Query.Keywords }}" @@ -65,8 +78,21 @@ rows: selector: table[border="1"][cellpadding=5] > tbody > tr:has(a[href^="details.php?id="]) fields: - title: + is_polish: #Workaround: https://github.com/Jackett/Jackett/issues/8068#issuecomment-610222414 + text: "" + is_polish: + optional: true + selector: img[src*="cat_pl"] + attribute: src + title_phase1: selector: a[href^="details.php?id="] + title_polish: + text: "{{ .Result.title_phase1 }}" + filters: + - name: append + args: " POLISH" + title: + text: "{{ if and (.Config.lang) (.Result.is_polish) }}{{ .Result.title_polish }}{{else}}{{ .Result.title_phase1 }}{{end}}" details: selector: a[href^="details.php?id="] attribute: href @@ -78,7 +104,7 @@ args: cat download: selector: a[href^="download.php/"] - attribute: href + attribute: href description: optional: true selector: img[src^="/pic/cat_pl/"]