diff --git a/.vscode/settings.json b/.vscode/settings.json index ad7aa31..55e6144 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,4 +6,5 @@ }, "java.debug.settings.onBuildFailureProceed": true, "jdk.jdkhome": "/Users/julian/.local/share/mise/installs/java/22.0.2", + "java.debug.settings.console": "internalConsole" } \ No newline at end of file diff --git a/src/main/java/de/jeyp91/tippliga/TLWMatch.java b/src/main/java/de/jeyp91/tippliga/TLWMatch.java index 5813811..30c6072 100644 --- a/src/main/java/de/jeyp91/tippliga/TLWMatch.java +++ b/src/main/java/de/jeyp91/tippliga/TLWMatch.java @@ -179,19 +179,11 @@ public class TLWMatch extends BaseMatch{ } public String getFormulaHome() { - String formula = "D"; - if (this.formulaHome != null) { - formula = this.formulaHome; - } - return "'" + formula + "'"; + return this.formulaHome != null ? this.formulaHome : "D"; } public String getFormulaGuest() { - String formula = "D"; - if (this.formulaGuest != null) { - formula = this.formulaGuest; - } - return "'" + formula + "'"; + return this.formulaGuest != null ? this.formulaGuest : "D"; } public String getSQLQueryInsert() { @@ -218,8 +210,8 @@ public class TLWMatch extends BaseMatch{ this.status + ", " + nullToSqlEmptyString(this.matchDatetime) + ", " + nullToSqlEmptyString(this.groupId) + ", " + - getFormulaHome() + ", " + - getFormulaGuest() + ", " + + "'" + getFormulaHome() + "'" + ", " + + "'" + getFormulaGuest() + "'" + ", " + nullToSqlEmptyString(this.koMatch) + ", " + nullToSqlEmptyString(this.goalsOvertimeHome) + ", " + nullToSqlEmptyString(this.goalsOvertimeGuest) + ", " + diff --git a/src/main/java/de/jeyp91/tippliga/TLWMatchesUpdaterFootball.java b/src/main/java/de/jeyp91/tippliga/TLWMatchesUpdaterFootball.java index f34d776..a018ab0 100644 --- a/src/main/java/de/jeyp91/tippliga/TLWMatchesUpdaterFootball.java +++ b/src/main/java/de/jeyp91/tippliga/TLWMatchesUpdaterFootball.java @@ -193,9 +193,15 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase { // update empty match if(!done) { for (TLWMatch tlwMatch : tlwMatches) { - if (tlwMatch.getTeamIdHome() == 0 && tlwMatch.getTeamIdGuest() == 0 - && (Objects.equals(tlwMatch.getFormulaHome(), "") || Objects.equals(tlwMatch.getFormulaHome(), "D")) - && (Objects.equals(tlwMatch.getFormulaGuest(), "") || Objects.equals(tlwMatch.getFormulaGuest(), "D")) + Integer teamIdHome = tlwMatch.getTeamIdHome(); + Integer teamIdGuest = tlwMatch.getTeamIdGuest(); + String formulaHome = tlwMatch.getFormulaHome(); + String formulaGuest = tlwMatch.getFormulaGuest(); + if ( + (Objects.equals(teamIdHome, 0) || Objects.equals(teamIdHome, null)) + && (Objects.equals(teamIdGuest, 0) || Objects.equals(teamIdGuest, null)) + && (Objects.equals(formulaHome, "") || Objects.equals(formulaHome, "D")) + && (Objects.equals(formulaGuest, "") || Objects.equals(formulaGuest, "D")) ) { tlwMatch.updateMatch(missingMatch); done = true; diff --git a/src/main/resources/Tippliga/Team_ID_Matcher_Config.json b/src/main/resources/Tippliga/Team_ID_Matcher_Config.json index 80d85e9..1731308 100644 --- a/src/main/resources/Tippliga/Team_ID_Matcher_Config.json +++ b/src/main/resources/Tippliga/Team_ID_Matcher_Config.json @@ -1564,6 +1564,11 @@ "tippligaID": 677, "apiFootballID": 16078 }, + { + "teamname": "Fortuna Köln", + "tippligaID": 583, + "apiFootballID": 1326 + }, { "teamname": "NEXT TEAM", "tippligaID": 674, diff --git a/src/main/resources/Tippliga_Configs/2027/wtl.json b/src/main/resources/Tippliga_Configs/2027/wtl.json index b2d3f2d..3128e93 100644 --- a/src/main/resources/Tippliga_Configs/2027/wtl.json +++ b/src/main/resources/Tippliga_Configs/2027/wtl.json @@ -121,14 +121,14 @@ { "type": "PlaceholderSingleMatch", "koMatch": true, - "placeholderDatetime": "2027-04-20 20:45:00", + "placeholderDatetime": "2027-04-21 20:45:00", "formulaHome": "D", "formulaGuest": "D" }, { "type": "PlaceholderSingleMatch", "koMatch": true, - "placeholderDatetime": "2027-04-20 20:45:00", + "placeholderDatetime": "2027-04-21 20:45:00", "formulaHome": "D", "formulaGuest": "D" },