INNER CODE UNIT · Python
_update_download_status
devnen/Kitten-TTS-Server · engine.py:191
def _update_download_status(phase: str, detail: str = "", progress_pct: int = 0, error: str = None):
"""Update the download status for the UI to poll."""
global _download_status
_download_status = {
"active": error is None and phase != "complete",
"phase": phase,
"detail": detail,
"progress_pct": progress_pct,
"error": error,
}
def get_download_status() -> Dict[str, Any]:
"""Returns the current download/loading status for UI polling."""
return dict(_download_status)
def is_loading() -> bool: