Fix small bugs in google calendar event generator
This commit is contained in:
@@ -61,6 +61,9 @@ public class TippligaGoogleEventManager {
|
|||||||
public static Event findEvent(List<Event> allEvents, Integer season, Integer league, Integer matchday, Integer deliveryDateNumber) {
|
public static Event findEvent(List<Event> allEvents, Integer season, Integer league, Integer matchday, Integer deliveryDateNumber) {
|
||||||
String description = getDescription(season, league, matchday, deliveryDateNumber);
|
String description = getDescription(season, league, matchday, deliveryDateNumber);
|
||||||
String descriptionHtml = getDescriptionHTML(season, league, matchday, deliveryDateNumber);
|
String descriptionHtml = getDescriptionHTML(season, league, matchday, deliveryDateNumber);
|
||||||
|
if(matchday == 34) {
|
||||||
|
String debug = "";
|
||||||
|
}
|
||||||
for (Event event : allEvents) {
|
for (Event event : allEvents) {
|
||||||
String eventDescription = event.getDescription();
|
String eventDescription = event.getDescription();
|
||||||
if (
|
if (
|
||||||
@@ -87,8 +90,10 @@ public class TippligaGoogleEventManager {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
String googleEventStart = event.getStart().getDateTime().toString();
|
String googleEventStart = event.getStart().getDateTime().toString();
|
||||||
|
String googleEventEnd = event.getEnd().getDateTime().toString();
|
||||||
String googleEventStartBeautified = googleEventStart.substring(0, 19).replace("T", " ");
|
String googleEventStartBeautified = googleEventStart.substring(0, 19).replace("T", " ");
|
||||||
if(!googleEventStartBeautified.equals(deliveryDateString)) {
|
if(!googleEventStartBeautified.equals(deliveryDateString)
|
||||||
|
|| !googleEventEnd.equals(googleEventStart)) {
|
||||||
updateEvent(event, matchday, deliveryDateString, deliverDateNumber);
|
updateEvent(event, matchday, deliveryDateString, deliverDateNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class TLWLeague {
|
|||||||
|
|
||||||
public String getLeagueNameCalendar() {
|
public String getLeagueNameCalendar() {
|
||||||
String leagueName = this.leagueName;
|
String leagueName = this.leagueName;
|
||||||
if (leagueName.equals("1. Tippliga") || leagueName.equals("2. Tippliga")) {
|
if (leagueName.equals("1. Tippliga Würzburg") || leagueName.equals("2. Tippliga Würzburg")) {
|
||||||
leagueName = "Tippliga";
|
leagueName = "Tippliga";
|
||||||
}
|
}
|
||||||
return leagueName;
|
return leagueName;
|
||||||
|
|||||||
Reference in New Issue
Block a user