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

[Bug] Import API does not always find the station, even though searching manually for it finds it #97

Open Sorunome opened 8 months ago

Sorunome commented 8 months ago

It appears that when using the import API e.g. with the following post:

{
  'token': '-snip-',
  'dryRun': True,
  'lax': False,
  'cancelled': False,
  'train': {
    'journeyID': '1|320036|0|80|16052023',
    'type': 'IC',
    'line': None,
    'no': '1035'
  },
  'fromStation': {
    'name': 'Praha hl.n.',
    'scheduledTime': 1684230300.0,
    'realTime': None
  },
  'toStation': {
    'name': 'Brno-Zidenice',
    'scheduledTime': 1684240860.0,
    'realTime': 1684240860.0
  }
}

it does not find the station "Brno-Zidenice", despite it being searchable on the website.

While digging deeper soru noticed that it seems like the import API is only able to process stations also present in the autocomplete.js file, so (probably?) highly searched stations.

The expected behaviour would be to properly search the stations when importing.

BTW, I also tried directly with the ril identifier and it has the same issues