{% 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 keywords %} {% if torrent.keywords %} {% endif %} {% 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 or session.owner %} {% if session.moderator %} {% endif %} {% 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 }}
{{ 'Enabled' | trans }} {% if torrent.status %} {{ 'Yes' | trans }} {% else %} {{ 'No' | trans }} {% endif %}
{{ '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 }}
{{ 'Private' | trans }} {% if file.private %} {{ 'Yes' | trans }} {% else %} {{ 'No' | trans }} {% endif %}
{{ 'Source' | trans }} {# strip all tags then apply whitelist markdown filters to prevent ping from remote #} {{ file.source | trim | striptags | url_to_markdown | markdown_to_html | nl2br }}
{{ 'Software' | trans }} {# strip all tags then apply whitelist markdown filters to prevent ping from remote #} {{ file.software | trim | striptags | url_to_markdown | markdown_to_html | nl2br }}
{{ 'Comment' | trans }} {# strip all tags then apply whitelist markdown filters to prevent ping from remote #} {{ file.comment | trim | striptags | url_to_markdown | markdown_to_html | nl2br }}
{{ '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 %}
{{ 'Locale' | trans }}
{% if torrent.locales %}
{% set i = 0 %} {% for locale in torrent.locales | sort %}{% if i > 0 %},{% endif %} {{ locale | locale_name(locale) | u.title }}{% set i = i + 1 %}{% endfor %}
{% endif %}
{{ 'Category' | trans }}
{% if torrent.categories %}
{% set i = 0 %} {% for category in torrent.categories | sort %}{% if i > 0 %},{% endif %} {{ category | trans_category | u.title }}{% set i = i + 1 %}{% endfor %}
{% endif %}
{{ 'Sensitive' | trans }}
{% if torrent.sensitive %} {{ 'Yes' | trans }} {% else %} {{ 'No' | trans }} {% endif %}
{{ 'Poster' | trans }}
{% if torrent.poster %} {{ '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 %}