From 69214e8058931caa32230a348899e4154e78aaaf Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 9 Oct 2023 01:19:20 +0300 Subject: [PATCH] fix single file torrents display #11 --- templates/default/torrent/info.html.twig | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/default/torrent/info.html.twig b/templates/default/torrent/info.html.twig index 3d15181..742106d 100644 --- a/templates/default/torrent/info.html.twig +++ b/templates/default/torrent/info.html.twig @@ -215,8 +215,18 @@ {{ 'Files'|trans }}
- {% for tree in file.tree %} - {{ recursive_file_tree(tree) }} + {% for key, value in file.tree %} + {% if value is iterable %} + {{ recursive_file_tree(value) }} + {% else %} +
+ {{ key }} +
+ {{ value | format_bytes }} +
+
+ {% endif %} + {% endfor %}