diff --git a/Scripts/Scale-Pixel.ps1 b/Scripts/Scale-Pixel.ps1 index 8030d75..1c8f6d7 100644 --- a/Scripts/Scale-Pixel.ps1 +++ b/Scripts/Scale-Pixel.ps1 @@ -10,13 +10,17 @@ if (-not (Get-Command "magick" -ErrorAction SilentlyContinue)) { exit } +if ($in -notmatch '\\$') { + $in += "\" +} + if (Test-Path $in -PathType container) { - $out_dir = "$out\x$scale\" + $out_dir = "$out\$(Split-Path -Leaf $in)_x$scale\" if (-not (Test-Path $out_dir)) { New-Item "$out_dir" -ItemType directory } foreach ($image in Get-ChildItem "$in*" -Include *.png, *.jpg, *.gif) { - $scaled = "$out_dir$($image.BaseName)$($image.Extension)" + $scaled = "$out_dir$($image.BaseName)_x$scale$($image.Extension)" Write-Host $scaled magick $image.FullName -scale "$($scale * 100)%" $scaled } diff --git a/Scripts/Stream.ps1 b/Scripts/Stream.ps1 index 2321cc8..9522177 100644 --- a/Scripts/Stream.ps1 +++ b/Scripts/Stream.ps1 @@ -13,10 +13,11 @@ if ($url) { } $streamlink_opts = "--default-stream $quality" - $streamlink_opts = " --retry-streams $retryinterval" - if ($out -and -not $norecord) { - $streamlink_opts = " --record $out" + $streamlink_opts += " --retry-streams $retryinterval" + if ($record -and -not $norecord) { + $streamlink_opts += " --record $record" } + Write-Host "streamlink $streamlink_opts $url" Start-Process streamlink -ArgumentList "$streamlink_opts $url" } diff --git a/Scripts/Update-And-Clean.ps1 b/Scripts/Update-And-Clean.ps1 index b3e7755..815f07d 100644 --- a/Scripts/Update-And-Clean.ps1 +++ b/Scripts/Update-And-Clean.ps1 @@ -3,6 +3,8 @@ param( [switch]$CleanOnly ) +winget upgrade --all + if ((Get-Command "scoop" -ErrorAction SilentlyContinue) -and -not $elevated) { if (-not $CleanOnly) { scoop update