diff --git a/format/station-board-req.js b/format/station-board-req.js index c9b28c5c..b81918ea 100644 --- a/format/station-board-req.js +++ b/format/station-board-req.js @@ -14,6 +14,9 @@ const formatStationBoardReq = (ctx, station, type) => { ], dur: opt.duration } + if (opt.results !== null) { + req.maxJny = opt.results === Infinity ? 10000 : opt.results + } if (profile.departuresGetPasslist) req.getPasslist = !!opt.stopovers if (profile.departuresStbFltrEquiv) req.stbFltrEquiv = !opt.includeRelatedStations diff --git a/index.js b/index.js index 6d5bc96a..0a0abf89 100644 --- a/index.js +++ b/index.js @@ -51,6 +51,7 @@ const createClient = (profile, userAgent, opt = {}) => { // todo: for arrivals(), this is actually a station it *has already* stopped by direction: null, // only show departures stopping by this station duration: 10, // show departures for the next n minutes + results: 50, // max. number of results – `null` means "whatever HAFAS wants" linesOfStops: false, // parse & expose lines at the stop/station? remarks: true, // parse & expose hints & warnings? stopovers: false, // fetch & parse previous/next stopovers?