From a9c9d68bba362a3d952159d9afa111c826cfc797 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 13 Feb 2024 15:38:06 +0200 Subject: [PATCH] solidtorrents: add prefer magnet links --- src/Jackett.Common/Definitions/solidtorrents.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Jackett.Common/Definitions/solidtorrents.yml b/src/Jackett.Common/Definitions/solidtorrents.yml index ad931eb81..06968fa6b 100644 --- a/src/Jackett.Common/Definitions/solidtorrents.yml +++ b/src/Jackett.Common/Definitions/solidtorrents.yml @@ -53,6 +53,10 @@ caps: book-search: [q] settings: + - name: prefer_magnet_links + type: checkbox + label: Prefer Magnet Links + default: false - name: sort type: select label: Sort requested from site @@ -78,6 +82,7 @@ search: sort: "{{ .Config.sort }}" order: "{{ .Config.type }}" limit: 100 + page: 1 rows: selector: li.search-result:has(a[class="dl-torrent"]) @@ -90,9 +95,16 @@ search: details: selector: h5 a attribute: href - download: + download_optional: selector: a[class="dl-torrent"] attribute: href + optional: true + download: + text: "{{ if .Config.prefer_magnet_links }}{{ else }}{{ .Result.download_optional }}{{ end }}" + optional: true + magnet: + selector: a[href^="magnet:?xt"] + attribute: href infohash: selector: a[href^="magnet:?xt"] attribute: href