diff --git a/parse/departure.js b/parse/departure.js index a4fce0dd..e8f2d9bf 100644 --- a/parse/departure.js +++ b/parse/departure.js @@ -20,7 +20,7 @@ const createParseDeparture = (profile, stations, lines, remarks) => { remarks: d.remL ? d.remL.map(findRemark) : [], trip: +d.jid.split('|')[1] // todo: this seems brittle } - // todo: res.trip from rawLine.prodCtx.num + // todo: res.trip from rawLine.prodCtx.num? if (d.stbStop.dTimeR && d.stbStop.dTimeS) { const realtime = profile.parseDateTime(profile, d.date, d.stbStop.dTimeR) diff --git a/parse/line.js b/parse/line.js index 47333a14..d4e7117e 100644 --- a/parse/line.js +++ b/parse/line.js @@ -12,11 +12,10 @@ const createParseLine = (profile, operators) => { name: p.line || p.name, public: true } + // todo: what is p.prodCtx && p.prodCtx.num? - // We don't get a proper line id from the API, so we use the trip nr here. - // todo: find a better way - if (p.prodCtx && p.prodCtx.num) res.id = p.prodCtx.num // This is terrible, but FPTF demands an ID. Let's pray for VBB to expose an ID. + // todo: find a better way else if (p.line) res.id = slugg(p.line.trim()) else if (p.name) res.id = slugg(p.name.trim())