Skip to content

Open-source AI podcast clipper. Generate vertical clips with face tracking and burned-in captions. CLI, MCP server, web app.

fix: remove termios.tcflush that corrupted terminal state

Nika Siradze7600678448d2
diff --git a/backend/cli.py b/backend/cli.py
index a4b386d..d936533 100644
--- a/backend/cli.py
+++ b/backend/cli.py
@@ -1443,7 +1443,6 @@ def interactive_menu():
print()
try:
- _flush_stdin()
raw = input(f" {accent}▸{reset} ")
choice = "".join(c for c in raw if c.isprintable()).strip()
except (EOFError, KeyboardInterrupt):
@@ -1485,17 +1484,12 @@ def _clean_path(val):
def _flush_stdin():
"""Flush any buffered stdin (leftover newlines from previous inputs)."""
+ import select
try:
- import termios
- termios.tcflush(sys.stdin.fileno(), termios.TCIFLUSH)
- except (ImportError, termios.error, OSError):
- # Fallback for non-Unix or piped stdin
- import select
- try:
- while select.select([sys.stdin], [], [], 0.0)[0]:
- sys.stdin.readline()
- except Exception:
- pass
+ while select.select([sys.stdin], [], [], 0.0)[0]:
+ sys.stdin.readline()
+ except Exception:
+ pass
def _ask(prompt, default=None, validate=None, required=False, is_path=False):