61cdce9b60
Lint & Test / test (push) Failing after 8s
Adds cross-platform foreground-window tracking and exposes it over REST (/api/foreground) and the existing WebSocket feed. - foreground_service.py: Windows probe via ctypes (HANDLE-correct argtypes to avoid 64-bit handle truncation); macOS via AppKit; Linux via Xlib (Wayland returns unavailable). TTL cache + per-platform fallback. - browser_url_service.py: when foreground is a recognised browser, extract the page title from the window title (browser-name suffix stripped) and surface `is_browser` + `browser_page_title`. Optional UIA-based URL extraction behind MEDIA_SERVER_BROWSER_UIA env flag (off by default — Chromium browsers keep their accessibility tree dormant otherwise). - websocket_manager: poll foreground every 1s inside the existing status loop, broadcast `foreground` on connect and `foreground_update` on change. Diff only on user-visible fields to avoid geometry spam. - WebUI: new editorial card rendered under the monitor list on the Display tab — process name, window title, fullscreen/minimized/monitor chips, browser block when applicable, exe path, PID, started-ago, geometry, platform. 16px inter-section gap matches Settings cadence. - i18n: 25 new keys added to both en.json and ru.json. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
24 lines
647 B
Python
24 lines
647 B
Python
"""API route modules."""
|
|
|
|
from .audio import router as audio_router
|
|
from .browser import router as browser_router
|
|
from .callbacks import router as callbacks_router
|
|
from .display import router as display_router
|
|
from .foreground import router as foreground_router
|
|
from .health import router as health_router
|
|
from .links import router as links_router
|
|
from .media import router as media_router
|
|
from .scripts import router as scripts_router
|
|
|
|
__all__ = [
|
|
"audio_router",
|
|
"browser_router",
|
|
"callbacks_router",
|
|
"display_router",
|
|
"foreground_router",
|
|
"health_router",
|
|
"links_router",
|
|
"media_router",
|
|
"scripts_router",
|
|
]
|