Compare commits

..

5 Commits

Author SHA1 Message Date
0bf6db7980 chore: bump version to 0.1.4 2026-01-19 14:41:23 +01:00
6aa4ebb33f chore: update lockfile version 2026-01-19 14:41:15 +01:00
ca43ea8858 chore: bump version to 0.1.4 2026-01-19 14:41:09 +01:00
733e35b0d2 fix: constrain progress bar width 2026-01-19 14:41:01 +01:00
f3573dfffc fix: center progress bar container 2026-01-19 14:40:50 +01:00
5 changed files with 23 additions and 9 deletions

View File

@@ -1,3 +1,3 @@
"""Auditui package"""
__version__ = "0.1.3"
__version__ = "0.1.4"

View File

@@ -98,7 +98,8 @@ class Auditui(App):
table.cursor_type = "row"
yield table
yield Static("", id="progress_info")
yield ProgressBar(id="progress_bar", show_eta=False, show_percentage=False, total=100)
with Horizontal(id="progress_bar_container"):
yield ProgressBar(id="progress_bar", show_eta=False, show_percentage=False, total=100)
def on_mount(self) -> None:
"""Initialize the table and start fetching library data."""
@@ -525,6 +526,8 @@ class Auditui(App):
progress_info = self.query_one("#progress_info", Static)
progress_bar = self.query_one("#progress_bar", ProgressBar)
progress_bar_container = self.query_one(
"#progress_bar_container", Horizontal)
progress_percent = min(100.0, max(
0.0, (chapter_elapsed / chapter_total) * 100.0))
@@ -534,14 +537,15 @@ class Auditui(App):
progress_info.update(
f"{chapter_name} | {chapter_elapsed_str} / {chapter_total_str}")
progress_info.display = True
progress_bar.display = True
progress_bar_container.display = True
def _hide_progress(self) -> None:
"""Hide the progress widget."""
progress_info = self.query_one("#progress_info", Static)
progress_bar = self.query_one("#progress_bar", ProgressBar)
progress_bar_container = self.query_one(
"#progress_bar_container", Horizontal)
progress_info.display = False
progress_bar.display = False
progress_bar_container.display = False
def _save_position_periodically(self) -> None:
"""Periodically save playback position."""

View File

@@ -105,6 +105,14 @@ Static#progress_info {
text-style: bold;
margin: 0;
padding: 0;
text-align: center;
width: 100%;
}
#progress_bar_container {
align: center middle;
width: 100%;
height: 1;
}
ProgressBar#progress_bar {
@@ -112,8 +120,10 @@ ProgressBar#progress_bar {
background: #10131f;
border: none;
margin: 0;
padding: 0 1;
align: center middle;
padding: 0;
width: auto;
min-width: 40;
max-width: 80;
}
ProgressBar#progress_bar > .progress-bar--track {

View File

@@ -1,6 +1,6 @@
[project]
name = "auditui"
version = "0.1.3"
version = "0.1.4"
description = "An Audible TUI client"
readme = "README.md"
requires-python = ">=3.10,<3.13"

2
uv.lock generated
View File

@@ -35,7 +35,7 @@ wheels = [
[[package]]
name = "auditui"
version = "0.1.2"
version = "0.1.4"
source = { editable = "." }
dependencies = [
{ name = "audible" },