Update platform settings
This commit is contained in:
parent
2808223946
commit
0e67d8599b
4
run.py
4
run.py
|
@ -34,6 +34,10 @@ def update_display(display, dbi):
|
|||
try:
|
||||
trains = dbi.calc_real_times(get_trains(dbi, STATION_CODE))
|
||||
trains.sort(key=dbi.time_sort)
|
||||
if PLATFORMS_INCLUDE:
|
||||
trains = filter(lambda t: t['platform'] in PLATFORMS_INCLUDE, trains)
|
||||
elif PLATFORMS_EXCLUDE:
|
||||
trains = filter(lambda t: t['platform'] not in PLATFORMS_EXCLUDE, trains)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
display.info_1.set(OUT_OF_ORDER_TEXT)
|
||||
|
|
|
@ -23,6 +23,8 @@ DBI_HOST = "trains.xatlabs.com"
|
|||
STATION_CODE = "MH"
|
||||
STATION_NAME = "München Hbf"
|
||||
PLATFORM = "0"
|
||||
PLATFORMS_INCLUDE = None
|
||||
PLATFORMS_EXCLUDE = ["1", "2"]
|
||||
DEFAULT_OPERATOR = "DB"
|
||||
|
||||
ARRIVAL_HOUR_FORMAT = "Ankunft {}"
|
||||
|
|
Loading…
Reference in New Issue