nyaa/nyaa/templates/rss.xml

38 lines
1.7 KiB
XML

<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>{{ config.SITE_NAME }} Torrent File RSS (No magnets)</title>
<description>RSS Feed for {{ term }}</description>
<link>{{ url_for('home', _external=True) }}</link>
<atom:link href="{{ url_for('home', page='rss', _external=True) }}" rel="self" type="application/rss+xml" />
{% for torrent in torrent_query %}
<item>
<title>{{ torrent.display_name }}</title>
<description>{{ torrent.description }}</description>
{% if use_elastic %}
{% if torrent.has_torrent %}
<link>{{ url_for('download_torrent', torrent_id=torrent.meta.id, _external=True) }}</link>
{% else %}
<link>{{ create_magnet_from_info(torrent.display_name, torrent.info_hash) }}</link>
{% endif %}
<guid isPermaLink="true">{{ url_for('view_torrent', torrent_id=torrent.meta.id, _external=True) }}</guid>
<pubDate>{{ torrent.created_time|rfc822_es }}</pubDate>
{% else %}
{% if torrent.has_torrent %}
<link>{{ url_for('download_torrent', torrent_id=torrent.id, _external=True) }}</link>
{% else %}
<link>{{ torrent.magnet_uri }}</link>
{% endif %}
<guid isPermaLink="true">{{ url_for('view_torrent', torrent_id=torrent.id, _external=True) }}</guid>
<pubDate>{{ torrent.created_time|rfc822 }}</pubDate>
{% endif %}
<category>{{ torrent.main_category.name }} - {{ torrent.sub_category.name }}</category>
<size>{{ torrent.filesize }}</size>
<seeders>{{ torrent.stats.seed_count }}</seeders>
<leechers>{{ torrent.stats.leech_count }}</leechers>
<downloads>{{ torrent.stats.download_count }}</downloads>
<infoHash>{{ compute_hash(torrent.info_hash) }}</infoHash>
</item>
{% endfor %}
</channel>
</rss>