From dedb582baa5a51df1ec69820ad8f7de8f33b128f Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 20 Sep 2025 14:27:06 +0200 Subject: Departure, Trip: get line numbers from AVV EFA --- lib/Travel/Status/DE/EFA/Departure.pm | 3 ++- lib/Travel/Status/DE/EFA/Trip.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Travel/Status/DE/EFA/Departure.pm b/lib/Travel/Status/DE/EFA/Departure.pm index 5570532..a42cf08 100644 --- a/lib/Travel/Status/DE/EFA/Departure.pm +++ b/lib/Travel/Status/DE/EFA/Departure.pm @@ -70,7 +70,8 @@ sub new { key => $departure->{servingLine}{key}, stateless => $departure->{servingLine}{stateless}, stop_id_num => $departure->{stopID}, - line => $departure->{servingLine}{symbol}, + line => $departure->{servingLine}{symbol} + || $departure->{servingLine}{number}, train_type => $departure->{servingLine}{trainType}, train_name => $departure->{servingLine}{trainName}, train_no => $departure->{servingLine}{trainNum}, diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm index fbe2643..a0f88ae 100644 --- a/lib/Travel/Status/DE/EFA/Trip.pm +++ b/lib/Travel/Status/DE/EFA/Trip.pm @@ -28,7 +28,7 @@ sub new { product_class => $json->{product}{class}, polyline_raw => $conf{json}{leg}{coords}, name => $json->{name}, - line => $json->{disassembledName}, + line => $json->{disassembledName} // $json->{number}, number => $json->{properties}{trainNumber}, type => $json->{properties}{trainType} // $json->{product}{name}, id => $json->{id}, -- cgit v1.2.3