mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Aktualizacja filtrowania postojów
This commit is contained in:
@@ -117,15 +117,16 @@ export function getScheduledTrain(train: Train, trainStopIndex: number, stationN
|
|||||||
let prevStationName = '',
|
let prevStationName = '',
|
||||||
nextStationName = '';
|
nextStationName = '';
|
||||||
|
|
||||||
|
|
||||||
for (let i = trainStopIndex - 1; i >= 0; i--) {
|
for (let i = trainStopIndex - 1; i >= 0; i--) {
|
||||||
if (followingStops[i].stopName.startsWith('<strong>')) {
|
if (/strong|podg/g.test(followingStops[i].stopName)) {
|
||||||
prevStationName = followingStops[i].stopNameRAW;
|
prevStationName = followingStops[i].stopNameRAW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = trainStopIndex + 1; i < followingStops.length; i++) {
|
for (let i = trainStopIndex + 1; i < followingStops.length; i++) {
|
||||||
if (followingStops[i].stopName.startsWith('<strong>')) {
|
if (/strong|podg/g.test(followingStops[i].stopName)) {
|
||||||
nextStationName = followingStops[i].stopNameRAW;
|
nextStationName = followingStops[i].stopNameRAW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -139,7 +140,7 @@ export function getScheduledTrain(train: Train, trainStopIndex: number, stationN
|
|||||||
|
|
||||||
if (currentStop.departureLine == null) break;
|
if (currentStop.departureLine == null) break;
|
||||||
|
|
||||||
if (!/-|_|it|sbl/gi.test(currentStop.departureLine)) {
|
if (!/_|it|sbl/gi.test(currentStop.departureLine)) {
|
||||||
departureLine = currentStop.departureLine;
|
departureLine = currentStop.departureLine;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -150,7 +151,7 @@ export function getScheduledTrain(train: Train, trainStopIndex: number, stationN
|
|||||||
|
|
||||||
if (currentStop.arrivalLine == null) break;
|
if (currentStop.arrivalLine == null) break;
|
||||||
|
|
||||||
if (!/-|_|it|sbl/gi.test(currentStop.arrivalLine)) {
|
if (!/_|it|sbl/gi.test(currentStop.arrivalLine)) {
|
||||||
arrivingLine = currentStop.arrivalLine;
|
arrivingLine = currentStop.arrivalLine;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user