mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 18:30:00 +00:00
Add bare torrent hash
lambda is probably not the best way to go, suggestions for improvement are welcome!
This commit is contained in:
parent
3b87337c71
commit
d4621a23a7
|
@ -303,6 +303,7 @@ def render_rss(label, query, use_elastic):
|
||||||
use_elastic=use_elastic,
|
use_elastic=use_elastic,
|
||||||
term=label,
|
term=label,
|
||||||
site_url=flask.request.url_root,
|
site_url=flask.request.url_root,
|
||||||
|
compute_hash=lambda x: base64.b32encode(x).decode('utf-8'),
|
||||||
torrent_query=query)
|
torrent_query=query)
|
||||||
response = flask.make_response(rss_xml)
|
response = flask.make_response(rss_xml)
|
||||||
response.headers['Content-Type'] = 'application/xml'
|
response.headers['Content-Type'] = 'application/xml'
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
<seeders>{{ torrent.stats.seed_count }}</seeders>
|
<seeders>{{ torrent.stats.seed_count }}</seeders>
|
||||||
<leechers>{{ torrent.stats.leech_count }}</leechers>
|
<leechers>{{ torrent.stats.leech_count }}</leechers>
|
||||||
<downloads>{{ torrent.stats.download_count }}</downloads>
|
<downloads>{{ torrent.stats.download_count }}</downloads>
|
||||||
|
<infoHash>{{ compute_hash(torrent.info_hash) }}</infoHash>
|
||||||
</item>
|
</item>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</channel>
|
</channel>
|
||||||
|
|
Loading…
Reference in a new issue