From 5adde173cf0a191e4347681081bc253e4d5aa990 Mon Sep 17 00:00:00 2001 From: maxtli Date: Mon, 21 Oct 2024 13:20:11 -0400 Subject: [PATCH] bug fix to moretransit app's min minutes feature (#2799) --- apps/moretransit/moretransit.star | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/moretransit/moretransit.star b/apps/moretransit/moretransit.star index 9e0fb5899..f3d132219 100644 --- a/apps/moretransit/moretransit.star +++ b/apps/moretransit/moretransit.star @@ -131,7 +131,12 @@ def main(config): all_arrivals_to_stop = sorted(all_arrivals_to_stop, key = lambda x: x[0]) for (eta, color, name) in all_arrivals_to_stop: - if eta > MIN_MINUTES and len(renderable_subways) < MAX_SUBWAYS: + min_minutes = config.get("minTime") + if min_minutes == None or not min_minutes.isdigit(): + min_minutes = MIN_MINUTES + else: + min_minutes = int(min_minutes) + if eta > min_minutes and len(renderable_subways) < MAX_SUBWAYS: renderer = overlay_subway if config.bool("useStacked"): renderer = stack_subway