{% 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 %}{{ file.name }} - {{ 'Torrent' | trans }} #{{ torrent.id }}{% if pagination.page > 1 %} - {{ 'Page' | trans }} {{ pagination.page }}{% endif %} - {{ name }}{% endblock %} {% block main_content %}

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

{# #}
{{ 'Common'|trans }}
{% if file.hash.v1 %} {% endif %} {% if file.hash.v2 %} {% endif %} {# visible in H1 #} {% if file.created %} {% endif %} {% if file.size %} {% endif %} {% if file.pieces %} {% endif %} {% if file.source %} {% endif %} {% if file.software %} {% endif %} {% if file.comment %} {% endif %}
{{ 'ID'|trans }} #{{ torrent.id }}
{{ 'MD5'|trans }} {{ torrent.md5file }}
{{ 'Info hash v1'|trans }} {{ file.hash.v1 }}
{{ 'Info hash v2'|trans }} {{ file.hash.v2 }}
{{ 'Filename'|trans }} {{ file.name }}
{{ 'Created'|trans }} {{ file.created | format_date }}
{{ 'Size'|trans }} {{ file.size | format_bytes }}
{{ 'Pieces'|trans }} {{ file.pieces | format_number }}
{{ '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 %}
{% if activities %} {% for activity in activities %}
{{ render(controller( 'App\\Controller\\ActivityController::event', { activity : activity } )) }}
{% endfor %} {% if pagination.pages > 1 %}
  {# @TODO #}
{% if pagination.pages > 1 %} {{ 'Page' | trans | lower }} {{ pagination.page }} / {{ pagination.pages }} {% if pagination.page > 1 %} {% if pagination.page == 2 %} {{ 'Back' | trans | lower }} {% else %} {{ 'Back' | trans | lower }} {% endif %} {% endif %} {% if pagination.page < pagination.pages %} {{ 'Next' | trans | lower }} {% endif %} {% endif %}
{% endif %} {% endif %} {% endblock %}