From 51093d09c35f8836870898e1c0780c881b487014 Mon Sep 17 00:00:00 2001 From: pcnick Date: Fri, 17 Dec 2021 01:21:28 +0800 Subject: [PATCH] test 1 --- Animelibk.ps1 | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Animelibk.ps1 b/Animelibk.ps1 index f40d0de..c658966 100644 --- a/Animelibk.ps1 +++ b/Animelibk.ps1 @@ -42,11 +42,15 @@ if (-not($WorkData.Episode)) { } $WorkData -$Seasons_TC = "", "第一季", "第二季", "第三季", "第四季", "第五季" +#$Seasons_TC = "", "第一季", "第二季", "第三季", "第四季", "第五季" +$Seasons_TC = "", "Seasons 1", "Seasons 2", "Seasons 3", "Seasons 4", "Seasons 5" +$Lang = @{ + Season = "Season {0:00}" +} $Year = @($($JsonPath -replace '.*\\((?\d{4})?(?\d{2})?).*$', '${Y}'), $(get-date -Format 'yyyy')) | ? {-not([string]::IsNullOrEmpty($_))} | Select -First 1 # 取得目標資料夾是否存在,不存在建立資料夾,並取得資料夾物件 -$LinkPath = "{2}\{0}\{1}" -f $WorkData.DestinName, $Seasons_TC[$WorkData.Season], $Index +$LinkPath = "{2}\{0}\{1}" -f $WorkData.DestinName, $($Lang["Season"] -f $WorkData.Season), $Index $LinkDir = $(if (-not(Test-Path -Path "$LinkPath*")) { New-Item -Path "$LinkPath ($Year)" -ItemType Directory -Force } else { @@ -70,7 +74,7 @@ function Get-StandName { $EpisodeRegex = @( "(?:S\d{2})?[\s]?-[\s]E?(?\d{2})" "[\[\b\s](?\d{2})[\s_]?(?:[vV]\d|END|FIN)[\]\b\s]" - "\[(?\d{1,2})\w{2}\]" + "\[(?\d{1,2})\D{2}\]" "\[(?\d{1,2})\]" ) @@ -145,8 +149,8 @@ exit 0; # SIG # Begin signature block # MIIFxwYJKoZIhvcNAQcCoIIFuDCCBbQCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzD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