From e21c2bda05e8e6cce6823a42c43dd423525f9001 Mon Sep 17 00:00:00 2001 From: laugengebaeck Date: Sun, 11 Dec 2022 16:23:17 +0100 Subject: Add Merklingen station on SFS Wendlingen - Ulm --- share/stations.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/share/stations.json b/share/stations.json index d9d1691..0b6dd1a 100644 --- a/share/stations.json +++ b/share/stations.json @@ -49517,6 +49517,15 @@ ], "name" : "Mering-St Afra" }, + { + "ds100" : "TMKL", + "eva" : 8003983, + "latlong" : [ + 48.5211319, + 9.7410035 + ], + "name" : "Merklingen - Schwäbische Alb" + }, { "ds100" : "XLM", "eva" : 8200110, -- cgit v1.2.3 From a0a3c662a714b32b2b779914a8c5c1505d2e6af8 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 11 Dec 2022 14:28:55 +0100 Subject: Add Merklingen - Schwäbische Alb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Doesn't have a DS100 code yet... --- share/stations.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/stations.json b/share/stations.json index 0b6dd1a..0f14015 100644 --- a/share/stations.json +++ b/share/stations.json @@ -49521,8 +49521,8 @@ "ds100" : "TMKL", "eva" : 8003983, "latlong" : [ - 48.5211319, - 9.7410035 + 48.521156, + 9.740873 ], "name" : "Merklingen - Schwäbische Alb" }, -- cgit v1.2.3 From 0a01de6e687a5e4bd03f21169bb6dc6b05833bb7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 11 Dec 2022 16:31:31 +0100 Subject: new_p: handle unknown EVA IDs --- lib/Travel/Status/DE/IRIS.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm index 3b1ff47..1f364ac 100644 --- a/lib/Travel/Status/DE/IRIS.pm +++ b/lib/Travel/Status/DE/IRIS.pm @@ -54,6 +54,15 @@ sub new_p { my @candidates = $opt{get_station}( $opt{station} ); + if ( @candidates != 1 and $opt{station} =~ m{^\d+$} ) { + @candidates = ( + [ + "D$opt{station}", "Betriebsstelle nicht bekannt $opt{station}", + $opt{station} + ] + ); + } + if ( @candidates == 0 ) { return $promise->reject('station not found'); } -- cgit v1.2.3