From 4fe051a3aded6a0048fc7bca557b816b2c54a412 Mon Sep 17 00:00:00 2001 From: juftin Date: Fri, 15 Sep 2023 10:58:45 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20download=20file=20worker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- browsr/browsr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browsr/browsr.py b/browsr/browsr.py index 4836893..805d336 100644 --- a/browsr/browsr.py +++ b/browsr/browsr.py @@ -19,7 +19,7 @@ from rich.syntax import Syntax from rich.traceback import Traceback from rich_pixels import Pixels -from textual import on +from textual import on, work from textual.binding import Binding, BindingType from textual.containers import Container, Horizontal from textual.events import Mount @@ -346,6 +346,7 @@ def _get_download_file_name(self) -> pathlib.Path: handled_download_path = handle_duplicate_filenames(file_path=download_path) return handled_download_path + @work(thread=True) def download_selected_file(self) -> None: """ Download the selected file.