From a94e54c51ba8845f5c0e011c29f4e0eeb73739b6 Mon Sep 17 00:00:00 2001 From: ali Date: Fri, 20 Nov 2026 13:48:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(menu):=20=E8=A1=A5=E4=B8=8A=20variety=20?= =?UTF-8?q?=E7=9A=84=20ValidateSet=20=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:95853ec 新增「综艺整理」时只改了 $ActionPlan 与菜单项, [ValidateSet] 仍只有 rename/archive/extract-subs/check,右键点击在参数 绑定阶段即失败,动作根本执行不到。 改动:ValidateSet 增加 variety,与 $ActionPlan 的五个动作对齐。 实测:五个动作逐个传参均通过绑定并走到「没有收到要处理的路径」; 非法动作仍被拒绝;PowerShell AST 解析 0 错误。 --- scripts/explorer-media-rename.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/explorer-media-rename.ps1 b/scripts/explorer-media-rename.ps1 index 44fbb39..627ee1b 100644 --- a/scripts/explorer-media-rename.ps1 +++ b/scripts/explorer-media-rename.ps1 @@ -30,7 +30,7 @@ #> [CmdletBinding()] param( - [ValidateSet('rename', 'archive', 'extract-subs', 'check')] + [ValidateSet('rename', 'archive', 'variety', 'extract-subs', 'check')] [string]$Action = 'rename', [switch]$Pause, [switch]$DryRun,