Backend optimizations, frontend optimizations, and UI design improvements
Backend optimizations: - GZip middleware for compressed responses - Concurrent WebSocket broadcast - Skip status polling when no clients connected - Deduplicated token validation with caching - Fire-and-forget HA state callbacks - Single stat() per browser item - Metadata caching (LRU) - M3U playlist optimization - Autostart setup (Task Scheduler + hidden VBS launcher) Frontend code optimizations: - Fix thumbnail blob URL memory leak - Fix WebSocket ping interval leak on reconnect - Skip artwork re-fetch when same track playing - Deduplicate volume slider logic - Extract magic numbers into named constants - Standardize error handling with toast notifications - Cache play/pause SVG constants - Loading state management for async buttons - Request deduplication for rapid clicks - Cache 30+ DOM element references - Deduplicate volume updates over WebSocket Frontend design improvements: - Progress bar seek thumb and hover expansion - Custom themed scrollbars - Toast notification accent border strips - Keyboard focus-visible states - Album art ambient glow effect - Animated sliding tab indicator - Mini-player top progress line - Empty state SVG illustrations - Responsive tablet breakpoint (601-900px) - Horizontal player layout on wide screens (>900px) - Glassmorphism mini-player with backdrop blur - Vinyl spin animation (toggleable) - Table horizontal scroll on narrow screens Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,17 +2,17 @@ Unregister-ScheduledTask -TaskName "MediaServer" -Confirm:$false -ErrorAction Si
|
||||
|
||||
# Get the media-server directory (parent of scripts folder)
|
||||
$serverRoot = (Get-Item $PSScriptRoot).Parent.FullName
|
||||
$vbsPath = Join-Path $PSScriptRoot "start-hidden.vbs"
|
||||
|
||||
# Find Python executable
|
||||
$pythonPath = (Get-Command python -ErrorAction SilentlyContinue).Source
|
||||
if (-not $pythonPath) {
|
||||
Write-Error "Python not found in PATH. Please ensure Python is installed and accessible."
|
||||
if (-not (Test-Path $vbsPath)) {
|
||||
Write-Error "start-hidden.vbs not found in scripts folder."
|
||||
exit 1
|
||||
}
|
||||
|
||||
$action = New-ScheduledTaskAction -Execute $pythonPath -Argument "-m media_server.main" -WorkingDirectory $serverRoot
|
||||
$trigger = New-ScheduledTaskTrigger -AtStartup
|
||||
$principal = New-ScheduledTaskPrincipal -UserId "$env:USERNAME" -LogonType S4U -RunLevel Highest
|
||||
# Launch via wscript + VBS to run python completely hidden (no console window)
|
||||
$action = New-ScheduledTaskAction -Execute "wscript.exe" -Argument "`"$vbsPath`"" -WorkingDirectory $serverRoot
|
||||
$trigger = New-ScheduledTaskTrigger -AtLogon -User "$env:USERNAME"
|
||||
$principal = New-ScheduledTaskPrincipal -UserId "$env:USERNAME" -LogonType Interactive -RunLevel Highest
|
||||
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable
|
||||
Register-ScheduledTask -TaskName "MediaServer" -Action $action -Trigger $trigger -Principal $principal -Settings $settings -Description "Media Server for Home Assistant"
|
||||
|
||||
|
||||
7
scripts/start-hidden.vbs
Normal file
7
scripts/start-hidden.vbs
Normal file
@@ -0,0 +1,7 @@
|
||||
Set WshShell = CreateObject("WScript.Shell")
|
||||
' Get the directory of this script (scripts\), then go up to media-server root
|
||||
scriptDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
|
||||
serverRoot = CreateObject("Scripting.FileSystemObject").GetParentFolderName(scriptDir)
|
||||
WshShell.CurrentDirectory = serverRoot
|
||||
' Run python completely hidden (0 = hidden, False = don't wait)
|
||||
WshShell.Run "python -m media_server.main", 0, False
|
||||
Reference in New Issue
Block a user