adicao do campo "played" nas jornadas firebase

This commit is contained in:
2026-04-30 10:23:45 +01:00
parent 02a235c114
commit cbdaa8a5e5
2 changed files with 7 additions and 2 deletions

2
.idea/vcs.xml generated
View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -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")) {