torrentz2: fix #2770 urlencode display name for magnet

This commit is contained in:
Garfield69 2018-03-22 17:33:25 +13:00
parent 6e5e326d64
commit 021468d6f5
1 changed files with 6 additions and 1 deletions

View File

@ -94,6 +94,11 @@
args: ".torrent"
download:
text: "{{if .Config.itorrents-links}}{{ .Result.download-itorrents }}{{else}}{{end}}"
magfile:
text: "{{ .Result.title }}"
filters:
- name: validfilename
- name: urlencode
magnet:
selector: dt a
attribute: href
@ -103,7 +108,7 @@
- name: prepend
args: "magnet:?xt=urn:btih:"
- name: append
args: "&dn={{ .Result.title }}.torrent"
args: "&dn={{ .Result.magfile }}.torrent"
category:
optional: true
selector: dt