add todos & comments

This commit is contained in:
Jannis R 2024-03-12 12:26:46 +01:00
parent d3bc9d351d
commit 7f78dc9458
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
3 changed files with 13 additions and 0 deletions

View file

@ -51,6 +51,8 @@ const transformReq = (ctx, req) => {
});
}
// todo: `LocGeoPos`/nearby() breaks with `getStops: false`
return req;
};

View file

@ -110,6 +110,9 @@ const linkTypesByCode = Object.assign(Object.create(null), {
// "durS": "091400"
// }
// todo bvg:
// {"type": "R", "code": "text.realtime.journey.cancelled", "icoX": 7, "txtN": ": S41"} with icon {"res": "rt_cancel"}
const parseHint = (ctx, h) => {
// todo: C

View file

@ -113,6 +113,14 @@ const parseJourneyLeg = (ctx, pt, date) => { // pt = raw leg
res.transfer = true;
}
if (pt.type === 'DEVI') {
// > DEVI Legs are Deviations.
// > It happens if you ask for a route to a specific stopPlace but HAFAS returns one to another stopPlace. Happens mainly in the night when there is no route to you destination for the forseeable future.
// > For Instance you want to go from Berlin Hbf to München Hbf. One of the only routes to München is to München Ost with a NJ at your time.
// > HAFAS returns that NJ and the last leg is a DEVI that just says "you wanted München HBF, this route ends in München Ost"
// > Bahn.de for instance ignores this completly, the DEVI leg also has no real information.
// https://github.com/public-transport/hafas-client/issues/301#issuecomment-1840820895
// todo: pt.resState, pt.resRecommendation
res.transfer = true;
}