Skip to content

Commit

Permalink
Changed thumbnail csv to include fullname
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Sep 1, 2020
1 parent 2d92063 commit 8d495ce
Show file tree
Hide file tree
Showing 2 changed files with 10,216 additions and 10,216 deletions.
5 changes: 3 additions & 2 deletions src/Javinizer/Public/Update-JVThumbCsv.ps1
Expand Up @@ -68,6 +68,7 @@ function Update-JVThumbCsv {
$groupedObject = ($actressObject + $actressObjectJa | Group-Object ThumbUrl) | Where-Object { $_.Count -eq 2 }
foreach ($actress in $groupedObject) {
$combinedActressObject += [PSCustomObject]@{
FullName = "$((($actress.Group[0].Name -replace '\.\.\.', '' -replace '&', '&').Trim() -split ' ')[1]) $((($actress.Group[0].Name -replace '\.\.\.', '' -replace '&', '&').Trim() -split ' ')[0])".Trim()
LastName = (($actress.Group[0].Name -replace '\.\.\.', '' -replace '&', '&').Trim() -split ' ')[1]
FirstName = (($actress.Group[0].Name -replace '\.\.\.', '' -replace '&', '&').Trim() -split ' ')[0]
JapaneseName = ($actress.Group[1].Name).Trim() -replace '(.*)', '' -replace '&', '&'
Expand All @@ -80,12 +81,12 @@ function Update-JVThumbCsv {
if ($null -ne $actressCsv) {
if (!(Compare-Object -ReferenceObject $actressCsv -DifferenceObject $actress -IncludeEqual -ExcludeDifferent -Property @('JapaneseName', 'ThumbUrl'))) {
$actressString = "$($actress.LastName) $($actress.FirstName)".Trim()
Write-JVLog -Level Info -Message "[Page $x] Actress [($actressString - $($actress.JapaneseName)] written to thumb csv"
Write-JVLog -Level Info -Message "[Page $x] Actress [$actressString - $($actress.JapaneseName)] written to thumb csv"
$actress | Export-Csv -LiteralPath $ThumbCsvPath -Append -Encoding utf8
}
} else {
$actressString = "$($actress.LastName) $($actress.FirstName)".Trim()
Write-JVLog -Level Info -Message "[Page $x] Actress [($actressString - $($actress.JapaneseName)] written to thumb csv"
Write-JVLog -Level Info -Message "[Page $x] Actress [$actressString - $($actress.JapaneseName)] written to thumb csv"
$actress | Export-Csv -LiteralPath $ThumbCsvPath -Append -Encoding utf8
}
}
Expand Down

0 comments on commit 8d495ce

Please sign in to comment.