2017-05-12 20:51:49 +02:00
|
|
|
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
|
|
|
|
<channel>
|
2017-05-19 19:25:48 +03:00
|
|
|
<title>{{ config.SITE_NAME }} Torrent File RSS</title>
|
2017-05-13 09:06:31 +03:00
|
|
|
<description>RSS Feed for {{ term }}</description>
|
2017-05-13 01:59:52 +02:00
|
|
|
<link>{{ url_for('home', _external=True) }}</link>
|
|
|
|
<atom:link href="{{ url_for('home', page='rss', _external=True) }}" rel="self" type="application/rss+xml" />
|
2017-05-15 23:51:58 -07:00
|
|
|
{% for torrent in torrent_query %}
|
2017-05-12 20:51:49 +02:00
|
|
|
<item>
|
|
|
|
<title>{{ torrent.display_name }}</title>
|
2017-05-19 19:25:48 +03:00
|
|
|
{# <description><![CDATA[{{ torrent.description }}]]></description> #}
|
2017-05-15 23:51:58 -07:00
|
|
|
{% if use_elastic %}
|
2017-05-14 09:21:47 +03:00
|
|
|
{% 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>
|
2017-05-19 19:25:48 +03:00
|
|
|
|
|
|
|
<seeders> {{- torrent.seed_count }}</seeders>
|
|
|
|
<leechers> {{- torrent.leech_count }}</leechers>
|
|
|
|
<downloads>{{- torrent.download_count }}</downloads>
|
|
|
|
<infoHash> {{- torrent.info_hash }}</infoHash>
|
2017-05-15 23:51:58 -07:00
|
|
|
{% else %}
|
2017-05-14 09:21:47 +03:00
|
|
|
{% 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>
|
2017-05-19 19:25:48 +03:00
|
|
|
|
|
|
|
<seeders> {{- torrent.stats.seed_count }}</seeders>
|
|
|
|
<leechers> {{- torrent.stats.leech_count }}</leechers>
|
|
|
|
<downloads>{{- torrent.stats.download_count }}</downloads>
|
|
|
|
<infoHash> {{- torrent.info_hash_as_hex }}</infoHash>
|
2017-05-15 23:51:58 -07:00
|
|
|
{% endif %}
|
2017-05-19 19:25:48 +03:00
|
|
|
{% set cat_id = use_elastic and ((torrent.main_category_id|string) + '_' + (torrent.sub_category_id|string)) or torrent.sub_category.id_as_string %}
|
|
|
|
<categoryId>{{- cat_id }}</categoryId>
|
|
|
|
<category> {{- category_name(cat_id) }}</category>
|
|
|
|
<size> {{- torrent.filesize | filesizeformat(True) }}</size>
|
2017-05-13 16:14:00 +02:00
|
|
|
</item>
|
2017-05-12 20:51:49 +02:00
|
|
|
{% endfor %}
|
|
|
|
</channel>
|
|
|
|
</rss>
|