mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 08:49:59 +00:00
S T O P H A R D C O D I N G U R L S
This commit is contained in:
parent
38a3ba277c
commit
b2b8ae9722
|
@ -312,7 +312,6 @@ def _jinja2_filter_rfc822(date, fmt=None):
|
|||
def render_rss(label, query):
|
||||
rss_xml = flask.render_template('rss.xml',
|
||||
term=label,
|
||||
site_url=flask.request.url_root,
|
||||
query=query)
|
||||
response = flask.make_response(rss_xml)
|
||||
response.headers['Content-Type'] = 'application/xml'
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
<description>
|
||||
RSS Feed for {{ term }}
|
||||
</description>
|
||||
<link>{{ site_url }}</link>
|
||||
<atom:link href="{{ site_url }}rss" rel="self" type="application/rss+xml" />
|
||||
<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 query %}
|
||||
{% if torrent.has_torrent %}
|
||||
<item>
|
||||
<title>{{ torrent.display_name }}</title>
|
||||
<link>
|
||||
{{ site_url }}view/{{ torrent.id }}/torrent
|
||||
{{ url_for('download_torrent', torrent_id=torrent.id, _external=True) }}
|
||||
</link>
|
||||
<guid isPermaLink="true">{{ site_url }}view/{{ torrent.id }}</guid>
|
||||
<guid isPermaLink="true">{{ url_for('view_torrent', torrent_id=torrent.id, _external=True) }}</guid>
|
||||
<pubDate>{{ torrent.created_time|rfc822 }}</pubDate>
|
||||
</item>
|
||||
{% endif %}
|
||||
|
|
|
@ -54,9 +54,9 @@
|
|||
<img src="/static/img/icons/{{ icon_dir }}/{{ cat_id }}.png">
|
||||
</a>
|
||||
</td>
|
||||
<td><a href="/view/{{ torrent.id }}">{{ torrent.display_name | escape }}</a></td>
|
||||
<td><a href="{{ url_for('view_torrent', torrent_id=torrent.id) }}">{{ torrent.display_name | escape }}</a></td>
|
||||
<td style="white-space: nowrap;text-align: center;">
|
||||
{% if torrent.has_torrent %}<a href="/view/{{ torrent.id }}/torrent"><i class="fa fa-fw fa-download"></i></a>{% endif %}
|
||||
{% if torrent.has_torrent %}<a href="{{ url_for('download_torrent', torrent_id=torrent.id) }}"><i class="fa fa-fw fa-download"></i></a>{% endif %}
|
||||
<a href="{{ torrent.magnet_uri }}"><i class="fa fa-fw fa-magnet"></i></a>
|
||||
</td>
|
||||
<td class="text-center">{{ torrent.filesize | filesizeformat(True) }}</td>
|
||||
|
|
Loading…
Reference in a new issue