From 8c201eff9bc760ad48b6de18689f35c8748ff6e5 Mon Sep 17 00:00:00 2001 From: test Date: Sun, 12 May 2024 17:14:03 +1000 Subject: [PATCH] Update DataDumpParser.java --- .../java/link/locutus/discord/apiv3/csv/DataDumpParser.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/link/locutus/discord/apiv3/csv/DataDumpParser.java b/src/main/java/link/locutus/discord/apiv3/csv/DataDumpParser.java index 896cbfb3..063476e2 100644 --- a/src/main/java/link/locutus/discord/apiv3/csv/DataDumpParser.java +++ b/src/main/java/link/locutus/discord/apiv3/csv/DataDumpParser.java @@ -260,7 +260,8 @@ private Map downloadNationFilesByDay() throws IOException, Pa long currentDay = TimeUtil.getDay(); if (currentDay > lastUpdatedNations) { Map 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); }); @@ -288,7 +289,8 @@ private Map downloadCityFilesByDay() throws IOException, Parse long currentDay = TimeUtil.getDay(); if (currentDay > lastUpdatedCities) { Map 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); });