From c094ddbbfe0d00ff76a976dad0fbf7c74d8bdd53 Mon Sep 17 00:00:00 2001 From: Big Jimmy Date: Sat, 4 Jan 2025 19:11:11 +0000 Subject: [PATCH] bodge schedule fix --- models/schedule_tabulate.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/models/schedule_tabulate.go b/models/schedule_tabulate.go index 9386c942..1bec6c86 100644 --- a/models/schedule_tabulate.go +++ b/models/schedule_tabulate.go @@ -366,12 +366,14 @@ func buildList(schedule []*ScheduleItem, dates []time.Time) []WeekScheduleList { // it comes from makescheduleslice see the s.fill line. needed otherwise the first show on monday will start at 6am on table view // or not, theres jukeboxes coming from elsewhere aswell if len(days[day].Shows) > 0 { - if days[day].Shows[len(days[day].Shows)-1].IsSustainer(){ - days[day].Shows = days[day].Shows[:len(days[day].Shows) - 1] - } if days[day].Shows[0].IsSustainer(){ days[day].Shows = days[day].Shows[1:] } + if len(days[day].Shows) > 0 { + if days[day].Shows[len(days[day].Shows)-1].IsSustainer(){ + days[day].Shows = days[day].Shows[:len(days[day].Shows) - 1] + } + } } } return days