summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Account.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-03-23 18:07:50 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-03-23 18:07:50 +0100
commita9b5a18943c3e2070703e745cd1131a02fd20365 (patch)
treeb65552c1a4a28e66811be19c5ec03e53fadc5600 /lib/Travelynx/Controller/Account.pm
parent5ef9ef68529bb77d79aa4529c48c8de328232186 (diff)
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
Diffstat (limited to 'lib/Travelynx/Controller/Account.pm')
-rw-r--r--lib/Travelynx/Controller/Account.pm19
1 files changed, 12 insertions, 7 deletions
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 );