transitous rewrite: only show next_stop if its actually stop and not the beginn of the route

This commit is contained in:
Kaaninchen
2026-08-18 14:27:47 +02:00
parent 729f350924
commit 3dcf1e8626
2 changed files with 2 additions and 9 deletions
+1 -6
View File
@@ -154,11 +154,6 @@ def get_next_station(stops: dict, train_from: str) -> dict | None:
for name, info in stops.items():
arrival_dt = info["arrival"]
if arrival_dt >= now:
return {
"name": name,
"arrival": arrival_dt
}
'''
if name == train_from:
return None
else:
@@ -166,7 +161,7 @@ def get_next_station(stops: dict, train_from: str) -> dict | None:
"name": name,
"arrival": arrival_dt
}
'''
return None
def format_via_list(stops: dict, via_and: str) -> str: