From 830f70a6bc2a6e0b7a78d0a13277b28f03c18504 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 10 Jan 2015 19:40:27 +0100 Subject: [enh] improve torrent results --- searx/templates/oscar/result_templates/torrent.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'searx/templates') diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html index bfb6cdbe6..f62a7a85b 100644 --- a/searx/templates/oscar/result_templates/torrent.html +++ b/searx/templates/oscar/result_templates/torrent.html @@ -5,9 +5,19 @@ {% if result.publishedDate %}{% endif %} {{ icon('link') }} {{ _('cached') }} -

{{ icon('transfer') }} {{ _('Seeder') }} {{ result.seed }}, {{ _('Leecher') }} {{ result.leech }} -
-{{ icon('magnet') }} magnet link

+

{{ icon('transfer') }} {{ _('Seeder') }} {{ result.seed }} • {{ _('Leecher') }} {{ result.leech }} +{% if result.filesize %}
{{ icon('floppy-disk') }} {{ _('Filesize') }} + + {% if result.filesize < 1024 %}{{ result.filesize }} Byte + {% elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} kb + {% elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} MB + {% elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} GB{% endif %} + {% endif %} +{% if result.files %}
{{ icon('file') }} {{ _('Number of Files') }} {{ result.files }}{% endif %}

+

+ {{ icon('magnet') }} magnet link + {% if result.torrentfile %}
{{ icon('download-alt') }} torrent file{% endif %} +

{% if result.content %}

{{ result.content|safe }}

{% endif %} -- cgit v1.2.3