Skip to content

Commit

Permalink
bug fix to moretransit app's min minutes feature (#2799)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtli authored Oct 21, 2024
1 parent f8af815 commit 5adde17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/moretransit/moretransit.star
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5adde17

Please sign in to comment.