1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 08:40:00 +00:00

Add amount of comments to RSS (#528)

Closes #496.
This commit is contained in:
Nalapl3 2018-10-27 16:17:13 +02:00 committed by Anna-Maria Meriniemi
parent c967b831c6
commit eabe13e20a
2 changed files with 4 additions and 0 deletions

View file

@ -40,6 +40,7 @@
<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>
<nyaa:comments> {{- torrent.comment_count }}</nyaa:comments>
{% set torrent_id = use_elastic and torrent.meta.id or torrent.id %} {% set torrent_id = use_elastic and torrent.meta.id or torrent.id %}
<description><![CDATA[<a href="{{ url_for('torrents.view', 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> <description><![CDATA[<a href="{{ url_for('torrents.view', 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>

View file

@ -27,6 +27,9 @@
<li> <li>
<p><code>&lt;nyaa:size&gt;</code> indicates the torrent's download size to one decimal place, using a magnitude prefix according to ISO/IEC 80000-13.</p> <p><code>&lt;nyaa:size&gt;</code> indicates the torrent's download size to one decimal place, using a magnitude prefix according to ISO/IEC 80000-13.</p>
</li> </li>
<li>
<p><code>&lt;nyaa:comments&gt;</code> holds the current amount of comments made on the respective torrent.</p>
</li>
</ul> </ul>
</div> </div>
{% endblock %} {% endblock %}