Dispaly hint if train is RE and stops are cancelled
This commit is contained in:
parent
21044e1407
commit
1be0fdef0c
5
run.py
5
run.py
|
@ -73,8 +73,9 @@ def update_display(display, dbi):
|
|||
train_type = parts[0] = parts[1].rstrip("0123456789")
|
||||
parts[1] = parts[1][len(parts[0]):]
|
||||
|
||||
if train_type == "RE":
|
||||
display.info_2.set(NO_STOP_EVERYWHERE_TEXT)
|
||||
if train_type == "RE" and any([stop.get('isCancelled') for stop in train['route']]):
|
||||
# If we have an RE train and any stop on the way is cancelled
|
||||
display.info_1.set("RE hält nicht überall")
|
||||
|
||||
is_arrival = any(filter(lambda arrival_station_name: filter_route(train['route'])[-1]['name'].startswith(arrival_station_name), ARRIVAL_STATIONS))
|
||||
|
||||
|
|
Loading…
Reference in New Issue