From 8e6a1999688c39692ad32716059fac8384101129 Mon Sep 17 00:00:00 2001 From: Louis FRADIN Date: Fri, 16 Oct 2026 13:35:55 +0200 Subject: [PATCH] Show a single Download button when a torrent has one file The ZIP/Selected buttons and the file list are redundant for a single file. Co-Authored-By: Claude Sonnet 5.5 --- web/src/FileManager.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/web/src/FileManager.tsx b/web/src/FileManager.tsx index 20caf02..26cdecb 100644 --- a/web/src/FileManager.tsx +++ b/web/src/FileManager.tsx @@ -92,6 +92,20 @@ export function FileManager({ torrentId, zipUrl }: { torrentId: number; zipUrl?: const crumbs = dir === '/' ? [] : dir.slice(1).split('/') + const only = dir === '/' && entries.length === 1 && !entries[0].is_dir ? entries[0] : null + if (only) { + return ( +
+

Files

+
+ + Download + +
+
+ ) + } + return (

Files