Show indivudal train legs
This commit is contained in:
parent
5b2d248955
commit
85ebaf7c84
|
@ -224,15 +224,16 @@ class Trip:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if item["type"] == "train":
|
if item["type"] == "train":
|
||||||
name = f"{item['from']} -> {item['to']}"
|
for leg in item["legs"]:
|
||||||
elements.append(
|
name = f"{leg['from']} → {leg['to']}"
|
||||||
TripElement(
|
elements.append(
|
||||||
when=item["depart"],
|
TripElement(
|
||||||
title=name,
|
when=leg["depart"],
|
||||||
detail=item,
|
title=name,
|
||||||
element_type="train",
|
detail=leg,
|
||||||
|
element_type="train",
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
if item["type"] == "ferry":
|
if item["type"] == "ferry":
|
||||||
name = f"{item['from']} → {item['to']}"
|
name = f"{item['from']} → {item['to']}"
|
||||||
elements.append(
|
elements.append(
|
||||||
|
|
Loading…
Reference in a new issue