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