@ -2,6 +2,7 @@
$Path ,
$Index = " H:\AnimeLib " ,
$VarConfig ,
$RecorDB = " animelibk.ini " ,
[switch] $Single ,
[switch] $Force ,
[switch] $Sub
@ -55,11 +56,12 @@ if ($VarConfig) {
#$Path = "L:\Anime\202004 ストライク・ザ・ブラッド OVA IV\[Suzu-Kaze][Strike_the_Blood_IV_OVA][01-12FIN][BDRip_1080P][HEVC_YUV420P10]\[Suzu-Kaze] Strike the Blood IV 12FIN [BDRip 1920x1080 HEVC YUV420P10 FLAC].mkv"
#$Path = "H:\Anime\201901 盾の勇者の成り上がり\[LKSUB][Tate no Yuusha no Nariagari][01-25][GB][720P][MP4]\[LKSUB][Tate no Yuusha no Nariagari][01][GB][720P].mp4"
$JsonPath = $ ( " $ Index\Anime\* $ TargetName " , $ ( $Path -replace '(.*\\[^\[\\\]]*)\\\[.*' , '$1' ) | ? { Test-Path $_ } )
$WorkData = $ ( if ( Test-Path " $ JsonPath\animelibk.json " ) {
Get-Content " $ JsonPath\animelibk.json " | ConvertFrom-Json
$WorkData = $ ( if ( Test-Path $RecorDB ) {
Get-Content $RecorDB | ConvertFrom-Json
} else {
" " | select ID , WorkName , TargetName , DestinName , Season , Episode
" " | Select-Object ID , WorkName , TargetName , DestinName , Season , Episode
} )
if ( $RecorDB -notmatch " : " ) { $RecorDB = " $ JsonPath\ $ RecorDB " }
# 確認資料狀態,缺少則進行物件資料建立
if ( -not ( $WorkData . WorkName ) ) {
@ -167,5 +169,5 @@ $ENDResult = $BuildList | % {
#$ENDResult
#$ENDResult.gettype();
if ( -not ( $Sub ) ) { $ENDResult | % { if ( $_ . Episode ) { $WorkData . Episode + = $_ . Episode } } }
$WorkData | ConvertTo-Json | Out-File -Encoding " UTF8 " " $ JsonPath\animelibk.json "
$WorkData | ConvertTo-Json | Out-File -Encoding " UTF8 " $RecorDB
exit 0 ;