mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-10-31 23:15:54 +00:00
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:
parent
fe4ac73ca2
commit
6b71cf101e
|
@ -7,8 +7,8 @@
|
||||||
{% for torrent in torrent_query %}
|
{% for torrent in torrent_query %}
|
||||||
<item>
|
<item>
|
||||||
<title>{{ torrent.display_name }}</title>
|
<title>{{ torrent.display_name }}</title>
|
||||||
{# <description><![CDATA[{{ torrent.description }}]]></description> #}
|
|
||||||
{% if use_elastic %}
|
{% if use_elastic %}
|
||||||
|
{# ElasticSearch Torrent instances #}
|
||||||
{% if torrent.has_torrent and not magnet_links %}
|
{% if torrent.has_torrent and not magnet_links %}
|
||||||
<link>{{ url_for('download_torrent', torrent_id=torrent.meta.id, _external=True) }}</link>
|
<link>{{ url_for('download_torrent', torrent_id=torrent.meta.id, _external=True) }}</link>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
<nyaa:downloads>{{- torrent.download_count }}</nyaa:downloads>
|
<nyaa:downloads>{{- torrent.download_count }}</nyaa:downloads>
|
||||||
<nyaa:infoHash> {{- torrent.info_hash }}</nyaa:infoHash>
|
<nyaa:infoHash> {{- torrent.info_hash }}</nyaa:infoHash>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
{# Database Torrent rows #}
|
||||||
{% if torrent.has_torrent and not magnet_links %}
|
{% if torrent.has_torrent and not magnet_links %}
|
||||||
<link>{{ url_for('download_torrent', torrent_id=torrent.id, _external=True) }}</link>
|
<link>{{ url_for('download_torrent', torrent_id=torrent.id, _external=True) }}</link>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -39,6 +40,8 @@
|
||||||
<nyaa:categoryId>{{- cat_id }}</nyaa:categoryId>
|
<nyaa:categoryId>{{- cat_id }}</nyaa:categoryId>
|
||||||
<nyaa:category> {{- category_name(cat_id) }}</nyaa:category>
|
<nyaa:category> {{- category_name(cat_id) }}</nyaa:category>
|
||||||
<nyaa:size> {{- torrent.filesize | filesizeformat(True) }}</nyaa:size>
|
<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>
|
</item>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</channel>
|
</channel>
|
||||||
|
|
Loading…
Reference in a new issue