From 2d765bbf04a19364c7f0168ca5b1f29167860db9 Mon Sep 17 00:00:00 2001 From: Kharec Date: Sun, 4 Jan 2026 16:37:44 +0100 Subject: [PATCH] feat: add stats screen keybinding --- auditui/app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/auditui/app.py b/auditui/app.py index afe38d2..3a12344 100644 --- a/auditui/app.py +++ b/auditui/app.py @@ -27,7 +27,7 @@ from .table_utils import ( filter_unfinished_items, format_item_as_row, ) -from .ui import HelpScreen +from .ui import HelpScreen, StatsScreen if TYPE_CHECKING: from textual.widgets._data_table import ColumnKey @@ -41,6 +41,7 @@ class Auditui(App): BINDINGS = [ ("?", "show_help", "Help"), + ("s", "show_stats", "Stats"), ("n", "sort", "Sort by name"), ("p", "sort_by_progress", "Sort by progress"), ("a", "show_all", "All/Unfinished"), @@ -417,6 +418,10 @@ class Auditui(App): """Show the help screen with all keybindings.""" self.push_screen(HelpScreen()) + def action_show_stats(self) -> None: + """Show the stats screen with listening statistics.""" + self.push_screen(StatsScreen()) + def _check_playback_status(self) -> None: """Check if playback process has finished and update state accordingly.""" message = self.playback.check_status()