Skip to content

Commit

Permalink
add todos & comments
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Mar 12, 2024
1 parent d3bc9d3 commit 7f78dc9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions p/db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ const transformReq = (ctx, req) => {
});
}

// todo: `LocGeoPos`/nearby() breaks with `getStops: false`

return req;
};

Expand Down
3 changes: 3 additions & 0 deletions parse/hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions parse/journey-leg.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7f78dc9

Please sign in to comment.