summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-12-21 16:28:16 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-12-21 16:28:16 +0100
commita28be0732118547e4058aad5ec1fcaebecf2c4d2 (patch)
tree02ae1ec3589cbc97b0e50248a5f37d32d8002b43 /lib/Travelynx
parent8ac29a582cbea019a96ac74581cac27bea8d952e (diff)
IRIS checkins: do not update station names via ÖBB HAFAS
They are often quite different and IMHO that's more confusing than helpful. Plus, IRIS is legacy anyways.
Diffstat (limited to 'lib/Travelynx')
-rw-r--r--lib/Travelynx/Model/Stations.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Travelynx/Model/Stations.pm b/lib/Travelynx/Model/Stations.pm
index 6c647ec..3cb7c97 100644
--- a/lib/Travelynx/Model/Stations.pm
+++ b/lib/Travelynx/Model/Stations.pm
@@ -138,7 +138,8 @@ sub get_backends {
# Slow for MOTIS backends
sub add_or_update {
my ( $self, %opt ) = @_;
- my $stop = $opt{stop};
+ my $stop = $opt{stop};
+ my $keep_name = $opt{keep_name};
$opt{db} //= $self->{pg}->db;
$opt{backend_id} //= $self->get_backend_id(%opt);
@@ -285,7 +286,7 @@ sub add_or_update {
$opt{db}->update(
'stations',
{
- name => $loc->name,
+ ( $keep_name ? () : ( name => $loc->name ) ),
lat => $loc->lat,
lon => $loc->lon,
archived => 0