From 860f62d501179e5fd8bf6bd24fdb3883a8faf3bb Mon Sep 17 00:00:00 2001 From: Ace Date: Sun, 16 Feb 2020 22:43:13 +0100 Subject: [PATCH] Fix for incorrect (duplicate) event entries. --- modules/inkycal_calendar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/inkycal_calendar.py b/modules/inkycal_calendar.py index 8ff16985..0218d55e 100644 --- a/modules/inkycal_calendar.py +++ b/modules/inkycal_calendar.py @@ -170,7 +170,7 @@ def generate_image(): at_in_your_language, event.begin.format('HH:mm' if hours == '24' else 'hh:mm a'), event.name)) - if event.begin.day == now.replace(days=1).day: + elif event.begin.day == now.replace(days=1).day: if event.all_day: event_list.append('{}: {}'.format(tomorrow_in_your_language, event.name)) else: @@ -178,7 +178,7 @@ def generate_image(): at_in_your_language, event.begin.format('HH:mm' if hours == '24' else 'hh:mm a'), event.name)) - if event.end > after_two_days: + elif event.begin > after_two_days: if event.all_day: event_list.append('{}: {}'.format(event.begin.format('D MMM'), event.name)) else: