diff --git a/index.php b/index.php index 094d960..7af0d74 100644 --- a/index.php +++ b/index.php @@ -110,9 +110,9 @@ $lastMatches = array_slice($allMatches, 0, 8); $subTier = $rank['stat']['data']['attributes']['rankedGameModeStats']['squad-fpp']['currentTier']['subTier']; $image = "./images/ranks/" . $tier . "-" . $subTier . ".webp"; $rankPoint = htmlspecialchars($rank['stat']['data']['attributes']['rankedGameModeStats']['squad-fpp']['currentRankPoint']); - echo "name" . htmlspecialchars($playername) . "" . $rankPoint . ""; + echo "name" . htmlspecialchars($playername) . "$tier" . $rankPoint . ""; } else { - echo "name" . htmlspecialchars($playername) . ""; + echo "name" . htmlspecialchars($playername) . "$tier"; } diff --git a/update/get_matches.ps1 b/update/get_matches.ps1 index 3e1b0cb..cc77ff4 100644 --- a/update/get_matches.ps1 +++ b/update/get_matches.ps1 @@ -33,6 +33,8 @@ catch { Write-Output 'Unable to read file exitin' exit } + + foreach ($player in $player_data) { $lastMatches = $player.relationships.matches.data.id #| Select-Object -First 10 $playermatches = @() @@ -44,7 +46,7 @@ foreach ($player in $player_data) { } else { $stats = Invoke-RestMethod -Uri "https://api.pubg.com/shards/steam/matches/$match" -Method GET -Headers $headers - $sortedStats = $stats.included | Sort-Object { $_.attributes.stats.winplace } + $sortedStats = $stats.included | Where-Object { $_.attributes.stats } | Sort-Object { $_.attributes.stats.winplace } $stats.included = $sortedStats $stats | ConvertTo-Json -Depth 100 | Out-File "$scriptroot/../data/matches/$match.json" }