{% macro recursive_file_tree(tree) %} {% import _self as self %} {% for key, value in tree %} {% if value is iterable %}
{{ key }}
{{ self.recursive_file_tree(value) }}
{% else %}
{{ key }}
{{ value | format_bytes }}
{% endif %} {% endfor %} {% endmacro %} {% from _self import recursive_file_tree %} {% extends 'default/layout.html.twig' %} {% block title %}{{ 'Torrent' | trans }} #{{ torrent.id }} - {{ name }}{% endblock %} {% block main_content %}

{{ 'Torrent'|trans }} #{{ torrent.id }}

{# #}
{{ 'Common'|trans }}
{% if file.name %} {% endif %} {% if file.created %} {% endif %} {% if file.size %} {% endif %} {% if file.pieces %} {% endif %} {% if file.hash.v1 %} {% endif %} {% if file.hash.v2 %} {% endif %} {% if file.source %} {% endif %} {% if file.software %} {% endif %} {% if file.comment %} {% endif %}
{{ 'Filename'|trans }} {{ file.name }}
{{ 'Created'|trans }} {{ file.created | format_date }}
{{ 'Size'|trans }} {{ file.size | format_bytes }}
{{ 'Pieces'|trans }} {{ file.pieces | format_number }}
{{ 'Info hash v1'|trans }} {{ file.hash.v1 }}
{{ 'Info hash v2'|trans }} {{ file.hash.v2 }}
{{ 'Source'|trans }} {{ file.source }}
{{ 'Software'|trans }} {{ file.software }}
{{ 'Comment'|trans }} {{ file.comment }}
{{ 'Contributors'|trans }} {% for id, identicon in torrent.contributors %} {{'identicon'|trans }} {% endfor %}
{{ 'Scrape'|trans }}
{{ 'Seeders'|trans }} {{ torrent.scrape.seeders }}
{{ 'Peers'|trans }} {{ torrent.scrape.peers }}
{{ 'Leechers'|trans }} {{ torrent.scrape.leechers }}
{{ 'Files'|trans }}
{% for key, value in file.tree %} {% if value is iterable %} {{ recursive_file_tree(value) }} {% else %}
{{ key }}
{{ value | format_bytes }}
{% endif %} {% endfor %}
{{ 'Trackers'|trans }}
{% for tracker in trackers %}
{{ tracker }}
{% endfor %} {% for announces in trackers %} {% for tracker in announces %}
{% if tracker not in trackers %} {{ tracker }} {% endif %}
{% endfor %} {% endfor %}
{{ 'Locales' | trans }}
{% if torrent.locales %}
{% for i, locale in torrent.locales.value %}{% if i > 0 %},{% endif %} {{ locale|locale_name(locale)|u.title }}{% endfor %}
{% endif %}
{{ 'Sensitive'|trans }}
{% if torrent.sensitive %} {{ 'Yes' | trans }} {% else %} {{ 'No' | trans }} {% endif %}
{{ 'Articles' | trans }}
{% for article in torrent.articles %}
{{ article }}
{% endfor %}
{% endblock %}