From cbdaa8a5e5aea2acac02ce15c1c80002641091f3 Mon Sep 17 00:00:00 2001 From: 230421 <230421@epvc.pt> Date: Thu, 30 Apr 2026 10:23:45 +0100 Subject: [PATCH] adicao do campo "played" nas jornadas firebase --- .idea/vcs.xml | 2 +- src/main/java/org/example/StandingsScraper.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..35eb1dd 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/src/main/java/org/example/StandingsScraper.java b/src/main/java/org/example/StandingsScraper.java index 6fac89a..6380305 100644 --- a/src/main/java/org/example/StandingsScraper.java +++ b/src/main/java/org/example/StandingsScraper.java @@ -191,14 +191,19 @@ public class StandingsScraper { matchMap.put("away_logo", awayLogo); String homeGoalsStr = String.valueOf(match.get("homeGoals")); + String awayGoalsStr = String.valueOf(match.get("awayGoals")); + + boolean played = false; if (homeGoalsStr != null && !homeGoalsStr.equals("null") && !homeGoalsStr.trim().isEmpty()) { matchMap.put("home_golos", (int) Double.parseDouble(homeGoalsStr)); + played = true; } - String awayGoalsStr = String.valueOf(match.get("awayGoals")); if (awayGoalsStr != null && !awayGoalsStr.equals("null") && !awayGoalsStr.trim().isEmpty()) { matchMap.put("away_golos", (int) Double.parseDouble(awayGoalsStr)); + played = true; } + matchMap.put("played", played); Object dateObj = match.get("date"); if (dateObj != null && !String.valueOf(dateObj).equals("null")) {