Improve matcher to find event

This commit is contained in:
2022-08-05 14:53:28 +02:00
parent e286d1029c
commit 3095dbd0e5

View File

@@ -59,8 +59,8 @@ public class TippligaGoogleEventManager {
public static Event findEvent(List<Event> allEvents, Integer season, Integer league, Integer matchday, Integer deliveryDateNumber) {
String description = getDescription(season, league, matchday, deliveryDateNumber);
for (Event allEvent : allEvents) {
if (allEvent.getDescription().equals(description)) return allEvent;
for (Event event : allEvents) {
if (event.getDescription().replaceAll("\\s+","").equals(description.replaceAll("\\s+",""))) return event;
}
return null;
}