1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 08:10:03 +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:
sharkykh 2017-05-14 09:23:30 +03:00 committed by Kfir Hadas
parent 3b87337c71
commit d4621a23a7
2 changed files with 2 additions and 0 deletions

View file

@ -303,6 +303,7 @@ def render_rss(label, query, use_elastic):
use_elastic=use_elastic,
term=label,
site_url=flask.request.url_root,
compute_hash=lambda x: base64.b32encode(x).decode('utf-8'),
torrent_query=query)
response = flask.make_response(rss_xml)
response.headers['Content-Type'] = 'application/xml'

View file

@ -29,6 +29,7 @@
<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>