Traewelldroid / traewelldroid

Android app for @Traewelling public transport check-in service
https://traewelldroid.de
GNU Affero General Public License v3.0
67 stars 8 forks source link

Suchfunktion schlecht/funktioniert nicht #317

Closed Moritz-Schmidt closed 1 month ago

Moritz-Schmidt commented 5 months ago

Beschreibung In der Haltestellensuche lassen sich manche Haltestellen sehr schlecht bzw gar nicht finden. Z.B. der Ernst-Reuter-Platz (U), Berlin Außerdem wäre es toll, in den Suchergebnissen scrollen zu können (mehr als 5 Ergebnisse)

Expected behavior Suchergebnisse wie auf traewelling.de

Screenshots Suchergebnisse Traewelldroid: Screenshot_20240109-170314~2.png

Suchergebnisse Traewelling: Screenshot_20240109-170322~2.png

Smartphone:

jheubuch commented 5 months ago

I honestly have no idea how this is happening because Träwelldroid is using the exact same search method as the Träwelling Web UI. I'll think about adding more search options...

Moritz-Schmidt commented 5 months ago

I may have an idea why the results are differnet:

the Request: https://traewelling.de/transport/train/autocomplete/Ernst-Reuter-Platz gives following result:

[{"ibnr":104624,"rilIdentifier":null,"name":"Ernst-Reuter-Schule, Dietzenbach"},
{"ibnr":112036,"rilIdentifier":null,"name":"Ernst-Reuter-Stra\u00dfe, R\u00fcsselsheim"},
{"ibnr":506875,"rilIdentifier":null,"name":"Ernst-Reuter-Schule, Ha\u00dfloch"},
{"ibnr":561263,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Stuttgart"},
{"ibnr":620433,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Dachau"},
{"ibnr":677079,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Forchheim (Oberfranken)"},
{"ibnr":692231,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Neum\u00fcnster"},
{"ibnr":731013,"rilIdentifier":null,"name":"Ernst-Reuter-Platz (U), Berlin"},
{"ibnr":769548,"rilIdentifier":null,"name":"Ernst-Reuter-Platz, Bremerhaven"},
{"ibnr":887594,"rilIdentifier":null,"name":"Ernst-Reuter-Stra\u00dfe, Helmstedt"}]

The first 5 results are the ones displayed on traewelldroid while traewelling additionally does some JS stuff with the results including using a package called Awesomplete: https://github.com/Traewelling/traewelling/blob/develop/resources/js/components/station-autocomplete.js

This is probably the relevant difference.