Add support for EM Tippspiel

This commit is contained in:
2021-06-05 21:38:11 +02:00
parent af28e5cb6f
commit 089b8eba08
11 changed files with 235 additions and 20 deletions

View File

@@ -100,7 +100,7 @@ public class TLWMatch extends BaseMatch{
this.goalsHome = apiFootballMatch.getGoalsHome();
this.goalsGuest = apiFootballMatch.getGoalsGuest();
this.matchDatetime = apiFootballMatch.getMatchDateTime().replace("T", " ").substring(0, 19);
this.groupId = "";
this.groupId = this.getGroupFromMatchdayString(apiFootballMatch.getRound());
this.formulaHome = "";
this.formulaGuest = "";
this.status = status;
@@ -235,7 +235,7 @@ public class TLWMatch extends BaseMatch{
nullToSqlEmptyString(this.goalsOvertimeHome) + ", " +
nullToSqlEmptyString(this.goalsOvertimeGuest) + ", " +
nullToSqlEmptyString(this.showTable) + ", " +
"'0.00','0.00','0.00','0.00'";
"'','0.00','0.00','0.00','0.00'";
}
private String nullToSqlEmptyString(Integer number) {
@@ -267,4 +267,12 @@ public class TLWMatch extends BaseMatch{
this.goalsGuest = apiFootballMatch.getGoalsGuest();
this.matchDatetime = apiFootballMatch.getMatchDateTime().replace("T", " ").substring(0, 19);
}
private String getGroupFromMatchdayString(String matchdayString) {
if(matchdayString.startsWith("Group ")) {
return matchdayString.substring(6, 7);
} else {
return "";
}
}
}