derf / travelynx

Traewelling-inspired journey logger with realtime data
https://travelynx.de
GNU Affero General Public License v3.0
102 stars 16 forks source link

HAFAS backend: handle passing the same stop more than once #122

Open deingithub opened 4 months ago

deingithub commented 4 months ago

Moin,

this is a patch aspiring to fix #90 and #83. Currently the HAFAS backend in various places picks the first stop on the route that matches the EVA/name of the requested checkin and checkout points, without considering the arrival and departure times. The IRIS backend appears to have these checks in place already— https://github.com/derf/travelynx/blob/c04e58a8e46b73f8befe870fffdaff9bd9b3edfc/lib/Travelynx.pm#L767-L776

i've added the same kind of checks to various places:

some notes:

Cheers c:

derf commented 3 months ago

I'll probably postpone this until I have refactored and thoroughly unfucked the current timestamp situation in travelynx. It's the root of at least one nasty and hard-to-reproduce bug already.

deingithub commented 3 months ago

Okay, kein Problem!