Skip to content

Commit

Permalink
updater: fix UserAgent parameter not getting evaluated
Browse files Browse the repository at this point in the history
  • Loading branch information
xd003 authored Oct 27, 2023
1 parent d4eac50 commit 4aa2e34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mpv-root/installer/updater.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Check-7z {
$null = New-Item -ItemType Directory -Force (Split-Path $fallback7z)
$download_file = $fallback7z
Write-Host "Downloading 7zr.exe" -ForegroundColor Green
Invoke-WebRequest -Uri "https://www.7-zip.org/a/7zr.exe" -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox -OutFile $download_file
Invoke-WebRequest -Uri "https://www.7-zip.org/a/7zr.exe" -UserAgent $([Microsoft.PowerShell.Commands.PSUserAgent]::FireFox) -OutFile $download_file
}
else
{
Expand Down Expand Up @@ -69,7 +69,7 @@ function Check-Mpv {

function Download-Archive ($filename, $link) {
Write-Host "Downloading" $filename -ForegroundColor Green
Invoke-WebRequest -Uri $link -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox -OutFile $filename
Invoke-WebRequest -Uri $link -UserAgent $([Microsoft.PowerShell.Commands.PSUserAgent]::FireFox) -OutFile $filename
}

function Download-Ytplugin ($plugin, $version) {
Expand All @@ -91,7 +91,7 @@ function Download-Ytplugin ($plugin, $version) {
$plugin_exe = "youtube-dl.exe"
}
}
Invoke-WebRequest -Uri $link -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox -OutFile $plugin_exe
Invoke-WebRequest -Uri $link -UserAgent $([Microsoft.PowerShell.Commands.PSUserAgent]::FireFox) -OutFile $plugin_exe
}

function Extract-Archive ($file) {
Expand Down

0 comments on commit 4aa2e34

Please sign in to comment.