commit
1e62e93793
1 changed files with 5 additions and 1 deletions
|
|
@ -127,7 +127,9 @@ foreach ($player in $all_player_matches) {
|
||||||
stats = $killstat
|
stats = $killstat
|
||||||
winplace = (($all_player_matches | where-object { $_.playername -eq $player_name } ).player_matches | where-object { $_.id -eq $match.id }).stats.winplace
|
winplace = (($all_player_matches | where-object { $_.playername -eq $player_name } ).player_matches | where-object { $_.id -eq $match.id }).stats.winplace
|
||||||
}
|
}
|
||||||
|
Write-Output "Writing to file $scriptroot/../data/killstats/$($match.id)_$player_name.json"
|
||||||
$savekillstats | ConvertTo-Json | out-file "$scriptroot/../data/killstats/$($match.id)_$player_name.json"
|
$savekillstats | ConvertTo-Json | out-file "$scriptroot/../data/killstats/$($match.id)_$player_name.json"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -145,7 +147,7 @@ foreach ($file in $matchfiles) {
|
||||||
$killstats += $json
|
$killstats += $json
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
write-output "Archiveing $($file.name)"
|
write-output "Archiving $($file.name)"
|
||||||
Move-Item -Path $file.FullName -Destination "$scriptroot/../data/killstats/archive" -Force
|
Move-Item -Path $file.FullName -Destination "$scriptroot/../data/killstats/archive" -Force
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -361,8 +363,10 @@ write-output "Writing file"
|
||||||
|
|
||||||
$date = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
|
$date = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
|
||||||
$filenameDate = ($date -replace ":", "-")
|
$filenameDate = ($date -replace ":", "-")
|
||||||
|
write-output "writing to file : $scriptroot/../data/archive/$($filenameDate)_player_last_stats.json"
|
||||||
($playerstats | convertto-json) | out-file "$scriptroot/../data/archive/$($filenameDate)_player_last_stats.json"
|
($playerstats | convertto-json) | out-file "$scriptroot/../data/archive/$($filenameDate)_player_last_stats.json"
|
||||||
|
|
||||||
|
|
||||||
write-output "Cleaning cache"
|
write-output "Cleaning cache"
|
||||||
|
|
||||||
$files_keep = (($all_player_matches).player_matches.telemetry_url | Select-Object -Unique) | ForEach-Object { $_.split("/")[-1] }
|
$files_keep = (($all_player_matches).player_matches.telemetry_url | Select-Object -Unique) | ForEach-Object { $_.split("/")[-1] }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue