refactor: move constants to constants.py

This commit is contained in:
2025-12-15 20:57:30 +01:00
parent 5e3b33570d
commit 2d9970c198
2 changed files with 6 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ from textual.events import Key
from textual.widgets import DataTable, Footer, Header, ProgressBar, Static
from textual.worker import get_current_worker
from .constants import TABLE_COLUMNS, TABLE_CSS
from .constants import *
from .downloads import DownloadManager
from .library import LibraryClient
from .playback import PlaybackController
@@ -19,11 +19,6 @@ from .playback import PlaybackController
if TYPE_CHECKING:
from textual.widgets._data_table import ColumnKey
AUTHOR_NAME_MAX_LENGTH = 40
AUTHOR_NAME_DISPLAY_LENGTH = 37
PROGRESS_COLUMN_INDEX = 3
SEEK_SECONDS = 30.0
class Auditui(App):
"""Main application class for the Audible TUI app."""

View File

@@ -11,6 +11,11 @@ DEFAULT_CHUNK_SIZE = 8192
TABLE_COLUMNS = ("Title", "Author", "Length", "Progress")
AUTHOR_NAME_MAX_LENGTH = 40
AUTHOR_NAME_DISPLAY_LENGTH = 37
PROGRESS_COLUMN_INDEX = 3
SEEK_SECONDS = 30.0
TABLE_CSS = """
Screen {
background: #1e1e2e;