Add runtime script management with Home Assistant integration
Features: - Runtime script CRUD operations (create, update, delete) - Thread-safe ConfigManager for YAML updates - WebSocket notifications for script changes - Web UI script management interface with full CRUD - Home Assistant auto-reload on script changes - Client-side position interpolation for smooth playback - Include command field in script list API response Technical improvements: - Added broadcast_scripts_changed() to WebSocket manager - Enhanced HA integration to handle scripts_changed messages - Implemented smooth position updates in Web UI (100ms interval) - Thread-safe configuration updates with file locking Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,8 +41,9 @@ def get_media_controller() -> "MediaController":
|
||||
|
||||
if system == "Windows":
|
||||
from .windows_media import WindowsMediaController
|
||||
from ..config import settings
|
||||
|
||||
_controller_instance = WindowsMediaController()
|
||||
_controller_instance = WindowsMediaController(audio_device=settings.audio_device)
|
||||
elif system == "Linux":
|
||||
# Check if running on Android
|
||||
if _is_android():
|
||||
@@ -72,4 +73,13 @@ def get_current_album_art() -> bytes | None:
|
||||
return None
|
||||
|
||||
|
||||
__all__ = ["get_media_controller", "get_current_album_art"]
|
||||
def get_audio_devices() -> list[dict[str, str]]:
|
||||
"""Get list of available audio output devices (Windows only for now)."""
|
||||
system = platform.system()
|
||||
if system == "Windows":
|
||||
from .windows_media import WindowsMediaController
|
||||
return WindowsMediaController.get_audio_devices()
|
||||
return []
|
||||
|
||||
|
||||
__all__ = ["get_media_controller", "get_current_album_art", "get_audio_devices"]
|
||||
|
||||
Reference in New Issue
Block a user