Skip to content

Commit c87e193

Browse files
committed
filter out WESTbahn and EuroNight services in local-only mode
1 parent 9cbf5f2 commit c87e193

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/reachableFrom.js

+4
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,16 @@ const reachableForDay = async (date, stationId, localTrainsOnly) => {
6464
const reachable = l.flatMap(trainDepartures, departure => {
6565
// todo: make this less brittle
6666
if (localTrainsOnly) {
67+
// EuroNight (EN) services are sometimes misclassified as regional trains
68+
// so we filter them out manually.
69+
if (departure.line.name.startsWith("EN")) return []
6770
// since some privately operated trains are wrongly categorized as
6871
// regional transit, we filter them out manually. this list is
6972
// probably incomplete.
7073
if (departure.line.operator?.name === 'FlixTrain') return []
7174
if (departure.line.operator?.name === 'Snälltåget') return []
7275
if (departure.line.operator?.name === 'Urlaubs-Express') return []
76+
if (departure.line.operator?.name === 'WESTbahn') return []
7377
}
7478

7579
const { when, nextStopovers = [] } = departure

0 commit comments

Comments
 (0)