Add support for Austria Bundesliga

This commit is contained in:
Julian Arndt
2025-10-27 17:24:54 +01:00
parent dc1ebb2b57
commit 476051409e
7 changed files with 20 additions and 10 deletions

View File

@@ -66,7 +66,7 @@ public class App {
apiFootballUpdater.updateAllRounds(season);
}
case "MatchesListGistUpdater" -> {
MatchesListForumUpdater matchesListForumUpdater = new MatchesListForumUpdater(season);
MatchesListForumUpdater matchesListForumUpdater = new MatchesListForumUpdater();
matchesListForumUpdater.updateAllLeagues(season);
}
case "PostChecksum" -> {

View File

@@ -50,7 +50,7 @@ public class APIFootballUpdater {
}
public void updateAllFixtures(int season) {
HashSet<Integer> leagues = getLeagues(season);
HashSet<Integer> leagues = getLeagues();
for (Integer league : leagues) {
updateFixtures(season, league);
try {
@@ -62,7 +62,7 @@ public class APIFootballUpdater {
}
public void updateAllRounds(int season) {
HashSet<Integer> leagues = getLeagues(season);
HashSet<Integer> leagues = getLeagues();
for (Integer league : leagues) {
updateRounds(season, league);
try {
@@ -125,7 +125,7 @@ public class APIFootballUpdater {
return result.toString();
}
public HashSet<Integer> getLeagues(int season) {
public HashSet<Integer> getLeagues() {
JSONArray leaguesArray = ResourceProvider.getLigenConfig();
HashSet<Integer> leagues = new HashSet<>();
for (Object leagueObject : leaguesArray) {

View File

@@ -13,8 +13,8 @@ public class MatchesListForumUpdater {
private HashSet<Integer> leagues;
private static final Logger logger = LoggerFactory.getLogger(MatchesListForumUpdater.class);
public MatchesListForumUpdater(int season) {
this.leagues = new APIFootballUpdater().getLeagues(season);
public MatchesListForumUpdater() {
this.leagues = new APIFootballUpdater().getLeagues();
}
public void updateAllLeagues(int season) {