From 6b71cf101ec2133fba035c69c03080de9a812417 Mon Sep 17 00:00:00 2001 From: TheAMM Date: Sat, 22 Jul 2017 21:22:46 +0300 Subject: [PATCH] Add simple info in RSS Allows puny humans to gather some information from the RSS feed Fixes #299 (... and nobody will know!) --- nyaa/templates/rss.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nyaa/templates/rss.xml b/nyaa/templates/rss.xml index 295e1ea..1e3de72 100644 --- a/nyaa/templates/rss.xml +++ b/nyaa/templates/rss.xml @@ -7,8 +7,8 @@ {% for torrent in torrent_query %} {{ torrent.display_name }} - {# #} {% if use_elastic %} + {# ElasticSearch Torrent instances #} {% if torrent.has_torrent and not magnet_links %} {{ url_for('download_torrent', torrent_id=torrent.meta.id, _external=True) }} {% else %} @@ -22,6 +22,7 @@ {{- torrent.download_count }} {{- torrent.info_hash }} {% else %} + {# Database Torrent rows #} {% if torrent.has_torrent and not magnet_links %} {{ url_for('download_torrent', torrent_id=torrent.id, _external=True) }} {% else %} @@ -39,6 +40,8 @@ {{- cat_id }} {{- category_name(cat_id) }} {{- torrent.filesize | filesizeformat(True) }} + {% set torrent_id = use_elastic and torrent.meta.id or torrent.id %} + #{{ torrent_id }} | {{ torrent.display_name }} | {{ torrent.filesize | filesizeformat(True) }} | {{ category_name(cat_id) }} | {{ use_elastic and torrent.info_hash or torrent.info_hash_as_hex | upper }}]]> {% endfor %}