Dev #276
3 changed files with 18 additions and 5 deletions
|
|
@ -252,6 +252,13 @@ foreach ($winid in $new_win_matches) {
|
|||
$match_stats = Invoke-RestMethod -Uri "https://api.pubg.com/shards/steam/matches/$winid" -Method GET -Headers $headers
|
||||
if ($winmatches[0].gameMode -eq 'tdm' ) {
|
||||
continue
|
||||
}
|
||||
if (
|
||||
($winmatches[0].matchtype -eq 'event' -and $winmatches[0].gameMode -ne 'ibr') -or
|
||||
($winmatches[0].gameMode -eq 'tdm')
|
||||
) {
|
||||
Write-Output 'Skipping because of event or tdm'
|
||||
continue
|
||||
} #skip tdm matches
|
||||
if ($winmatches[0].matchType -eq 'custom') {
|
||||
$players_to_report = $match_stats.included.attributes.stats | where-object { $_.playerId -notlike "ai.*" }
|
||||
|
|
|
|||
|
|
@ -48,8 +48,11 @@ foreach ($player in $player_data) {
|
|||
$stats.included = $sortedStats
|
||||
$stats | ConvertTo-Json -Depth 100 | Out-File "$scriptroot/../data/matches/$match.json"
|
||||
}
|
||||
if($stats.data.attributes.matchtype -eq 'event' -or $stats.data.attributes.gameMode -eq 'tdm'){
|
||||
write-output 'Skipping because of event'
|
||||
if (
|
||||
($stats.data.attributes.matchtype -eq 'event' -and $stats.data.attributes.gameMode -ne 'ibr') -or
|
||||
($stats.data.attributes.gameMode -eq 'tdm')
|
||||
) {
|
||||
Write-Output 'Skipping because of event or tdm'
|
||||
continue
|
||||
}
|
||||
$playermatches += [PSCustomObject]@{
|
||||
|
|
|
|||
|
|
@ -162,8 +162,11 @@ $last_month = (get-date).AddMonths($monthsback)
|
|||
foreach ($file in $matchfiles) {
|
||||
$json = get-content $file | ConvertFrom-Json
|
||||
|
||||
if($json.stats.matchType -eq 'event' -or $json.stats.gameMode -eq 'tdm'){
|
||||
write-output 'match is event or tdm skipping'
|
||||
if (
|
||||
($stats.data.attributes.matchtype -eq 'event' -and $stats.data.attributes.gameMode -ne 'ibr') -or
|
||||
($stats.data.attributes.gameMode -eq 'tdm')
|
||||
) {
|
||||
Write-Output 'Skipping because of event or tdm'
|
||||
continue
|
||||
}
|
||||
if ($json.created -gt $last_month) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue