$ErrorActionPreference='Stop' $w=Get-Command winget -ErrorAction SilentlyContinue if(-not $w){throw 'WinGet jest niedostępny. Zainstaluj App Installer ze sklepu Microsoft.'} Write-Host 'Instaluję yt-dlp oraz ffmpeg przy użyciu WinGet.' -ForegroundColor Green & $w.Source install --id yt-dlp.yt-dlp -e --accept-source-agreements --accept-package-agreements if($LASTEXITCODE -ne 0){Write-Warning 'WinGet zgłosił błąd dla yt-dlp (być może program już jest zainstalowany).'} & $w.Source install --id Gyan.FFmpeg -e --accept-source-agreements --accept-package-agreements if($LASTEXITCODE -ne 0){Write-Warning 'WinGet zgłosił błąd dla ffmpeg.'} Write-Host 'Otwórz nową sesję terminala po instalacji.' Write-Host 'Korzystaj z pobierania treści, do których masz odpowiednie uprawnienia.'