improvements
This commit is contained in:
parent
63f69fe22a
commit
3bc3b43d3a
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ param(
|
|||
[switch]$CleanOnly
|
||||
)
|
||||
|
||||
winget upgrade --all
|
||||
|
||||
if ((Get-Command "scoop" -ErrorAction SilentlyContinue) -and -not $elevated) {
|
||||
if (-not $CleanOnly) {
|
||||
scoop update
|
||||
|
|
Loading…
Reference in a new issue