diff --git a/parse/journey-leg.js b/parse/journey-leg.js index cf8a4f7a..56630d15 100644 --- a/parse/journey-leg.js +++ b/parse/journey-leg.js @@ -43,7 +43,9 @@ const createParseJourneyLeg = (profile, stations, lines, remarks) => { if (passed && pt.jny.stopL) { const parse = profile.parseStopover(profile, stations, lines, remarks, j) - res.passed = pt.jny.stopL.map(parse) + const passedStations = pt.jny.stopL.map(parse) + // filter stations the train passes without stopping, as this doesn't comply with fptf (yet) + res.passed = passedStations.filter((x) => !x.passBy) } if (Array.isArray(pt.jny.remL)) { for (let remark of pt.jny.remL) applyRemark(j, remark) diff --git a/parse/stopover.js b/parse/stopover.js index 216d9c1b..e17e1be3 100644 --- a/parse/stopover.js +++ b/parse/stopover.js @@ -16,6 +16,9 @@ const createParseStopover = (profile, stations, lines, remarks, connection) => { res.departure = dep.toISO() } + // mark stations the train passes without stopping + if(st.dInS === false && st.aOutS === false) res.passBy = true + // todo: follow public-transport/friendly-public-transport-format#27 here // see also derhuerst/vbb-rest#19 if (st.aCncl) {