diff --git a/latestmatches.php b/latestmatches.php
index de2b080..6b14763 100644
--- a/latestmatches.php
+++ b/latestmatches.php
@@ -61,16 +61,16 @@ $ogDescription = "Dive into the detailed match stats of DTCH Clan in PUBG. Explo
echo "
";
echo "| Match Date | Game Mode | Match Type | Map | Kills | Damage Dealt | Time Survived | win Place |
";
foreach ($players_matches as $match) {
- print_r($match['stats']);
+ // print_r($match['stats']);
foreach ($match['stats'] as $stats) {
if ($stats['name'] === $selected_player) {
- // if (isset($_GET['filter_by_match_type'])) {
- // if ($_GET['filter_by_match_type'] !== 'all' && $match['matchType'] !== $_GET['filter_by_match_type']) {
- // continue;
- // }
- // }
+ if (isset($_GET['filter_by_match_type'])) {
+ if ($_GET['filter_by_match_type'] !== 'all' && $match['matchType'] !== $_GET['filter_by_match_type']) {
+ continue;
+ }
+ }
$date = new DateTime($match['createdAt']);
$date->modify('+1 hours');
$formattedDate = $date->format('m-d H:i:s');
diff --git a/update/get_matches.ps1 b/update/get_matches.ps1
index 5430119..8b81b89 100644
--- a/update/get_matches.ps1
+++ b/update/get_matches.ps1
@@ -114,7 +114,7 @@ foreach ($file in $matchfiles) {
createdAt = $filecontent.data.attributes.createdAt
mapName = $filecontent.data.attributes.mapName
id = $filecontent.data.id
- stats = $player_matches_cached
+ stats = @($player_matches_cached)
}
}
write-output "NEW $matchfiledate"