- Detect primary monitor via Windows EnumDisplayMonitors API and show badge - Expand accent color picker with 9 presets and custom color input - Auto-generate hover color for custom accent colors - Re-render accent swatches on locale change for proper i18n - Replace restart-server.bat with PowerShell restart-server.ps1 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
36 lines
1.2 KiB
PowerShell
36 lines
1.2 KiB
PowerShell
# Restart the Media Server
|
|
# Stop any running instance
|
|
$procs = Get-Process -Name 'media-server' -ErrorAction SilentlyContinue
|
|
foreach ($p in $procs) {
|
|
Write-Host "Stopping server (PID $($p.Id))..."
|
|
Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue
|
|
}
|
|
if ($procs) { Start-Sleep -Seconds 2 }
|
|
|
|
# Merge registry PATH with current PATH so newly-installed tools are visible
|
|
$regUser = [Environment]::GetEnvironmentVariable('PATH', 'User')
|
|
if ($regUser) {
|
|
$currentDirs = $env:PATH -split ';' | ForEach-Object { $_.TrimEnd('\') }
|
|
foreach ($dir in ($regUser -split ';')) {
|
|
if ($dir -and ($currentDirs -notcontains $dir.TrimEnd('\'))) {
|
|
$env:PATH = "$env:PATH;$dir"
|
|
}
|
|
}
|
|
}
|
|
|
|
# Start server detached
|
|
Write-Host "Starting server..."
|
|
Start-Process -FilePath 'media-server' `
|
|
-WorkingDirectory 'c:\Users\Alexei\Documents\haos-integration-media-player\media-server' `
|
|
-WindowStyle Hidden
|
|
|
|
Start-Sleep -Seconds 3
|
|
|
|
# Verify it's running
|
|
$check = Get-Process -Name 'media-server' -ErrorAction SilentlyContinue
|
|
if ($check) {
|
|
Write-Host "Server started (PID $($check[0].Id))"
|
|
} else {
|
|
Write-Host "WARNING: Server does not appear to be running!"
|
|
}
|