From a9b5a18943c3e2070703e745cd1131a02fd20365 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 23 Mar 2025 18:07:50 +0100 Subject: Preliminary DBRIS support (not user-accessible yet) working: * checkin * checkout * realtime data * polylines * carriage formation (long-distance only) to do: * geolocation * redirects after checkout / undo * traewelling sync * use dbris by default --- lib/Travelynx/Controller/Account.pm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'lib/Travelynx/Controller/Account.pm') diff --git a/lib/Travelynx/Controller/Account.pm b/lib/Travelynx/Controller/Account.pm index 9cd0edb..43b0683 100644 --- a/lib/Travelynx/Controller/Account.pm +++ b/lib/Travelynx/Controller/Account.pm @@ -1066,9 +1066,17 @@ sub backend_form { if ( $backend->{iris} ) { $type = 'IRIS-TTS'; $backend->{name} = 'IRIS'; - $backend->{longname} = 'Deutsche Bahn (IRIS-TTS)'; + $backend->{longname} = 'Deutsche Bahn: IRIS-TTS'; $backend->{homepage} = 'https://www.bahn.de'; } + elsif ( $backend->{dbris} ) { + $type = 'DBRIS'; + $backend->{longname} = 'Deutsche Bahn: bahn.de'; + $backend->{homepage} = 'https://www.bahn.de'; + + # not ready for production yet + $type = undef; + } elsif ( $backend->{hafas} ) { # These backends lack a journey endpoint or are no longer @@ -1135,14 +1143,11 @@ sub backend_form { $backend->{type} = $type; } - # These backends lack a journey endpoint and are useless for travelynx - @backends - = grep { $_->{name} ne 'Resrobot' and $_->{name} ne 'TPG' } @backends; - my $iris = shift @backends; - @backends - = sort { $a->{name} cmp $b->{name} } grep { $_->{type} } @backends; + @backends = map { $_->[1] } + sort { $a->[0] cmp $b->[0] } + map { [ lc( $_->{name} ), $_ ] } grep { $_->{type} } @backends; unshift( @backends, $iris ); -- cgit v1.2.3