Add simple info in RSS <description>

Allows puny humans to gather some information from the RSS feed
Fixes #299
(... and nobody will know!)
This commit is contained in:
TheAMM 2017-07-22 21:22:46 +03:00
parent fe4ac73ca2
commit 6b71cf101e
1 changed files with 4 additions and 1 deletions

View File

@ -7,8 +7,8 @@
{% for torrent in torrent_query %}
<item>
<title>{{ torrent.display_name }}</title>
{# <description><![CDATA[{{ torrent.description }}]]></description> #}
{% if use_elastic %}
{# ElasticSearch Torrent instances #}
{% if torrent.has_torrent and not magnet_links %}
<link>{{ url_for('download_torrent', torrent_id=torrent.meta.id, _external=True) }}</link>
{% else %}
@ -22,6 +22,7 @@
<nyaa:downloads>{{- torrent.download_count }}</nyaa:downloads>
<nyaa:infoHash> {{- torrent.info_hash }}</nyaa:infoHash>
{% else %}
{# Database Torrent rows #}
{% if torrent.has_torrent and not magnet_links %}
<link>{{ url_for('download_torrent', torrent_id=torrent.id, _external=True) }}</link>
{% else %}
@ -39,6 +40,8 @@
<nyaa:categoryId>{{- cat_id }}</nyaa:categoryId>
<nyaa:category> {{- category_name(cat_id) }}</nyaa:category>
<nyaa:size> {{- torrent.filesize | filesizeformat(True) }}</nyaa:size>
{% set torrent_id = use_elastic and torrent.meta.id or torrent.id %}
<description><![CDATA[<a href="{{ url_for('view_torrent', torrent_id=torrent_id, _external=True) }}">#{{ torrent_id }} | {{ torrent.display_name }}</a> | {{ torrent.filesize | filesizeformat(True) }} | {{ category_name(cat_id) }} | {{ use_elastic and torrent.info_hash or torrent.info_hash_as_hex | upper }}]]></description>
</item>
{% endfor %}
</channel>