{% 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 }}#}

{% if torrent.download.magnet.exist %} {% else %} {% endif %} {{ torrent.download.magnet.total }} {% if torrent.download.file.exist %} {% else %} {% endif %} {{ torrent.download.file.total }} {% if torrent.star.exist %} {% else %} {% endif %} {{ torrent.star.total }}
{% if session.moderator %} {% endif %} {% 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 %}
{{ 'Moderation' | trans }}
{{ 'Approved' | trans }} {% if torrent.approved %} {{ 'Yes' | trans }} {% else %} {{ 'No' | trans }} {% endif %}
{{ 'Common' | trans }}
{{ '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, status in trackers %}
{% if status %} {{ tracker }} {% else %} {{ tracker }} {% endif %}
{% endfor %}
{{ 'Locales' | trans }}
{% if torrent.locales %}
{% for i, locale in torrent.locales %}{% if i > 0 %},{% endif %} {{ locale|locale_name(locale)|u.title }}{% endfor %}
{% endif %}
{{ 'Sensitive' | trans }}
{% if torrent.sensitive %} {{ 'Yes' | trans }} {% else %} {{ 'No' | trans }} {% endif %}

{{ 'Recent activity' | trans }}

{% if activities %} {% for activity in activities %}
{{ render(controller( 'App\\Controller\\ActivityController::event', { user : session.user, activity : activity } )) }}
{% endfor %} {% if pagination.pages > 1 %}
 
{% 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 %}