|
|
@ -42,11 +42,15 @@ if (-not($WorkData.Episode)) { |
|
|
|
} |
|
|
|
} |
|
|
|
$WorkData |
|
|
|
$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 '.*\\((?<Y>\d{4})?(?<M>\d{2})?).*$', '${Y}'), $(get-date -Format 'yyyy')) | ? {-not([string]::IsNullOrEmpty($_))} | Select -First 1 |
|
|
|
$Year = @($($JsonPath -replace '.*\\((?<Y>\d{4})?(?<M>\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*")) { |
|
|
|
$LinkDir = $(if (-not(Test-Path -Path "$LinkPath*")) { |
|
|
|
New-Item -Path "$LinkPath ($Year)" -ItemType Directory -Force |
|
|
|
New-Item -Path "$LinkPath ($Year)" -ItemType Directory -Force |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -70,7 +74,7 @@ function Get-StandName { |
|
|
|
$EpisodeRegex = @( |
|
|
|
$EpisodeRegex = @( |
|
|
|
"(?:S\d{2})?[\s]?-[\s]E?(?<Episode>\d{2})" |
|
|
|
"(?:S\d{2})?[\s]?-[\s]E?(?<Episode>\d{2})" |
|
|
|
"[\[\b\s](?<Episode>\d{2})[\s_]?(?:[vV]\d|END|FIN)[\]\b\s]" |
|
|
|
"[\[\b\s](?<Episode>\d{2})[\s_]?(?:[vV]\d|END|FIN)[\]\b\s]" |
|
|
|
"\[(?<Episode>\d{1,2})\w{2}\]" |
|
|
|
"\[(?<Episode>\d{1,2})\D{2}\]" |
|
|
|
"\[(?<Episode>\d{1,2})\]" |
|
|
|
"\[(?<Episode>\d{1,2})\]" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -145,8 +149,8 @@ exit 0; |
|
|
|
# SIG # Begin signature block |
|
|
|
# SIG # Begin signature block |
|
|
|
# MIIFxwYJKoZIhvcNAQcCoIIFuDCCBbQCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB |
|
|
|
# MIIFxwYJKoZIhvcNAQcCoIIFuDCCBbQCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB |
|
|
|
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR |
|
|
|
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR |
|
|
|
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUnaUT7B6+atzTGRJLSX59DzPX |
|
|
|
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUXyS0VwT7Q1myOeFNJ/MJ3qkE |
|
|
|
# fjGgggNSMIIDTjCCAjagAwIBAgIQdMnAQ4BDAo9Lgfn+QeDdhjANBgkqhkiG9w0B |
|
|
|
# VkKgggNSMIIDTjCCAjagAwIBAgIQdMnAQ4BDAo9Lgfn+QeDdhjANBgkqhkiG9w0B |
|
|
|
# AQUFADAqMRMwEQYDVQQDDApOa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QEBBQAEggEAnvzVdQvGridnk2wdfYs8SjLEZYhc |
|
|
|
# cZgVbYsADrIwDQYJKoZIhvcNAQEBBQAEggEAs1/E/T9C3pxzuj5vjdXqz9/o+jVq |
|
|
|
# K3b7zpo5sNczj/zEFSsCskDik+oJ7p+vRszo7WGNt2/vJsbFPsIROYkxzV5UdgZR |
|
|
|
# +z6HEiy54akXOiyzKEqg+hB1rIffyd2/TBDO0UArl59sqHzjTvZ1KDrJaK6cHCxf |
|
|
|
# BDTpQhcRLPSdw6kipbKk1MPD6nmpCqQ1BdsvALJH8BXxr8UlaYZMhLiUS8dVx1Vh |
|
|
|
# DxXSIzfRWc+2BMhnTYhUMtF9sCqPW4uq3JnxQzBdFurSd4K5UDBDo8pKBvBfZBSU |
|
|
|
# Cr4zTBc1nmHf/QdLlNyHieCdCqwLam87yN03u9NXDqearWwP+Zh/58I+qCQjs3sU |
|
|
|
# +dOoP2rfAld/99b4wWBQ/A/o0qzwFxdVwzcMOvsK/iHMEqxNoKnXhdbEph7fklSB |
|
|
|
# coB9S7DCjoMp0NCpntohLkB2ZyLXdfbQM4bNUqQra5bcZAUAx6pPaDucCAqVbTtY |
|
|
|
# 6dFMXUWn9DdkKZASdk8/9zdsR67vD4hfq6ntVRZmagdlcKHc2FgUlHdzjnB8fgZp |
|
|
|
# fhXHdsfH9i1gd2TQUYkMBW59QwWy3EyeC5eKkBO+aQUj+85PH8DQftKFsg== |
|
|
|
# jzUdb20t2jKpmmTcmdLTj9S53ZttAtCvB2NsPaVzHuhNnccDorU849QCAQ== |
|
|
|
# SIG # End signature block |
|
|
|
# SIG # End signature block |
|
|
|