Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.
fix(install): harden PowerShell installer with TLS 1.2/1.3, API fallback, and silent progress
Samir Hossains2f8551eda08c
diff --git a/install.ps1 b/install.ps1index 419dec1..56d0dc2 100644--- a/install.ps1+++ b/install.ps1@@ -9,6 +9,12 @@ param()$ErrorActionPreference = 'Stop'+$ProgressPreference = 'SilentlyContinue'+try {+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13+} catch {+ # Non-fatal if runtime does not support Tls13 enum+}Set-StrictMode -Version Latest$AppName = "MovieBox-Tui"@@ -117,10 +123,17 @@ if (-not $TargetVersion) {$Request.AllowAutoRedirect = $false$Response = $Request.GetResponse()$Location = $Response.Headers["Location"]- $TargetVersion = $Location.Split('/')[-1].Trim()+ if ($Location) {+ $TargetVersion = $Location.Split('/')[-1].Trim()+ }$Response.Close()} catch {- Write-Err "Failed to contact GitHub for latest release. Please check your internet connection."+ try {+ $ReleaseJson = Invoke-RestMethod -Uri "https://api.github.com/repos/$Repo/releases/latest" -Headers @{ "User-Agent" = "MovieBox-Installer" } -UseBasicParsing+ $TargetVersion = $ReleaseJson.tag_name.Trim()+ } catch {+ Write-Err "Failed to contact GitHub for latest release. Please check your internet connection."+ }}}