|
|
|
@ -68,17 +68,17 @@ function Get-StandName {
|
|
|
|
|
|
|
|
|
|
# 因應檔名不同而設定多組正規方式 |
|
|
|
|
$EpisodeRegex = @( |
|
|
|
|
"S\d{2}[\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]" |
|
|
|
|
"\[(?<Episode>\d{1,2})\w{2}\]" |
|
|
|
|
"\[(?<Episode>\d{1,2})\]" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
$NameRegex = @( |
|
|
|
|
"[\[\b\s](?<Name>[^\[\]]*)[\]\b\s]$" |
|
|
|
|
"[\[\b\s](?<Name>[^\[\]]*)[\]\b\s]?$" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
$Result = $File.Name | % { Get-NameRegex $_ -Regex $EpisodeRegex } | % { $(Get-NameRegex $_["L"] -Regex $NameRegex -Exclude "(BD|DVD|HDTV)RIP" -End) + $_ } |
|
|
|
|
$Result = $File.Name | % { Get-NameRegex $_ -Regex $EpisodeRegex } | % { $(Get-NameRegex $_["L"] -Regex $NameRegex -Exclude "(BD|DVD|HDTV)RIP" -End) + $_ } | Select -First 1 |
|
|
|
|
|
|
|
|
|
# 建立回傳資料物件,以方便後續資料處理。 |
|
|
|
|
$OutputData = "" | Select newName, Season, Episode, newFullName; |
|
|
|
@ -145,8 +145,8 @@ exit 0;
|
|
|
|
|
# SIG # Begin signature block |
|
|
|
|
# MIIFxwYJKoZIhvcNAQcCoIIFuDCCBbQCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB |
|
|
|
|
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR |
|
|
|
|
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUoj6O9AeGdF5M/FWDj5z18zw0 |
|
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