Skip to content

Commit

Permalink
Update DataDumpParser.java
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed May 12, 2024
1 parent 6f994fa commit 8c201ef
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ private Map<Long, NationsFile> downloadNationFilesByDay() throws IOException, Pa
long currentDay = TimeUtil.getDay();
if (currentDay > lastUpdatedNations) {
Map<Long, File> downloaded = load("https://politicsandwar.com/data/nations/", new File(Settings.INSTANCE.DATABASE.DATA_DUMP.NATIONS));
downloaded.forEach((day, file) -> {
downloaded.forEach((time, file) -> {
long day = TimeUtil.getDay(time);
NationsFile natFile = new NationsFile(file, nationDict);
nationFilesByDay.putIfAbsent(day, natFile);
});
Expand Down Expand Up @@ -288,7 +289,8 @@ private Map<Long, CitiesFile> downloadCityFilesByDay() throws IOException, Parse
long currentDay = TimeUtil.getDay();
if (currentDay > lastUpdatedCities) {
Map<Long, File> downloaded = load("https://politicsandwar.com/data/cities/", new File(Settings.INSTANCE.DATABASE.DATA_DUMP.CITIES));
downloaded.forEach((day, file) -> {
downloaded.forEach((time, file) -> {
long day = TimeUtil.getDay(time);
CitiesFile cityFile = new CitiesFile(file, cityDict);
cityFilesByDay.putIfAbsent(day, cityFile);
});
Expand Down

0 comments on commit 8c201ef

Please sign in to comment.