hafasBackend: fix transfer type
This commit is contained in:
parent
4fc48f9a92
commit
2ff5e8936b
|
@ -35,6 +35,9 @@ proc mkParseLeg*(common: CommonData): proc =
|
||||||
result.polyline.get.features &= common.polylines[n.getInt()].features
|
result.polyline.get.features &= common.polylines[n.getInt()].features
|
||||||
|
|
||||||
let typeStr = l{"type"}.getStr()
|
let typeStr = l{"type"}.getStr()
|
||||||
|
|
||||||
|
echo typeStr
|
||||||
|
|
||||||
if typeStr == "JNY":
|
if typeStr == "JNY":
|
||||||
result.direction = some(l{"jny"}{"dirTxt"}.getStr())
|
result.direction = some(l{"jny"}{"dirTxt"}.getStr())
|
||||||
result.tripId = some(l{"jny"}{"jid"}.getStr())
|
result.tripId = some(l{"jny"}{"jid"}.getStr())
|
||||||
|
@ -48,11 +51,11 @@ proc mkParseLeg*(common: CommonData): proc =
|
||||||
if remarks.len > 0:
|
if remarks.len > 0:
|
||||||
result.remarks = some(remarks.map(mkParseMsg(common)))
|
result.remarks = some(remarks.map(mkParseMsg(common)))
|
||||||
|
|
||||||
elif typeStr == "WALK" or typeStr == "TRSF":
|
elif typeStr == "WALK":
|
||||||
result.isWalking = true
|
result.isWalking = true
|
||||||
result.distance = some(l{"gis"}{"dist"}.getInt())
|
result.distance = some(l{"gis"}{"dist"}.getInt())
|
||||||
|
|
||||||
elif typeStr == "DEVI":
|
elif typeStr == "TRSF" or typeStr == "DEVI":
|
||||||
result.isTransfer = true
|
result.isTransfer = true
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue