This commit is contained in:
2026-02-04 16:59:04 -08:00
parent cd0346489f
commit 37701cea48
6 changed files with 642 additions and 6 deletions

View File

@@ -1981,6 +1981,29 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
"If you need full [main2] logs, restart mpv so it starts with --log-file."
)
# Print database logs for mpv module (helper output)
try:
import sqlite3
log_db_path = str((Path(__file__).resolve().parent.parent / "logs.db"))
conn = sqlite3.connect(log_db_path, timeout=5.0)
cur = conn.cursor()
cur.execute(
"SELECT level, module, message FROM logs WHERE module = 'mpv' ORDER BY timestamp DESC LIMIT 200"
)
mpv_logs = cur.fetchall()
cur.close()
conn.close()
print("Helper logs from database (mpv module, most recent first):")
if mpv_logs:
for level, module, message in mpv_logs:
print(f"[{level}] {message}")
else:
print("(no helper logs found)")
except Exception as e:
debug(f"Could not fetch database logs: {e}")
pass
# Also print the helper log tail (this captures Python helper output that won't
# necessarily show up in MPV's own log-file).
try: