summaryrefslogtreecommitdiff
path: root/lib/Travel/Routing/DE
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-02-25 09:04:27 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-02-25 09:05:42 +0100
commit1557c7162f2192acd1a3970f03581a0b516af193 (patch)
tree3cdcfd16ffcc90320188ce355818954113a88b65 /lib/Travel/Routing/DE
parent791439d586ece2da7192cd2e0ab1fe4d1737a167 (diff)
Update ÖBB productbits and add descriptions to list
Diffstat (limited to 'lib/Travel/Routing/DE')
-rw-r--r--lib/Travel/Routing/DE/HAFAS.pm22
1 files changed, 19 insertions, 3 deletions
diff --git a/lib/Travel/Routing/DE/HAFAS.pm b/lib/Travel/Routing/DE/HAFAS.pm
index 0950c8e..4fdcfa5 100644
--- a/lib/Travel/Routing/DE/HAFAS.pm
+++ b/lib/Travel/Routing/DE/HAFAS.pm
@@ -108,8 +108,19 @@ my %hafas_instance = (
'ÖBB' => {
mgate => 'https://fahrplan.oebb.at/bin/mgate.exe',
name => 'Österreichische Bundesbahnen',
- productbits =>
- [qw[ice ice ice regio regio s bus ferry u tram ice ondemand ice]],
+ productbits => [
+ [ ice_rj => 'long distance trains' ],
+ [ sev => 'rail replacement service' ],
+ [ ic_ec => 'long distance trains' ],
+ [ d_n => 'night trains and rapid trains' ],
+ [ regio => 'regional trains' ],
+ [ s => 'suburban trains' ],
+ [ bus => 'busses' ],
+ [ ferry => 'maritime transit' ],
+ [ u => 'underground' ],
+ [ tram => 'trams' ],
+ [ other => 'other transit services' ]
+ ],
request => {
client => {
id => 'OEBB',
@@ -379,7 +390,12 @@ sub mot_mask {
my %mot_pos;
for my $i ( 0 .. $#{ $hafas_instance{$service}{productbits} } ) {
- $mot_pos{ $hafas_instance{$service}{productbits}[$i] } = $i;
+ if ( ref( $hafas_instance{$service}{productbits}[$i] ) eq 'ARRAY' ) {
+ $mot_pos{ $hafas_instance{$service}{productbits}[$i][0] } = $i;
+ }
+ else {
+ $mot_pos{ $hafas_instance{$service}{productbits}[$i] } = $i;
+ }
}
if ( my @mots = @{ $self->{exclusive_mots} // [] } ) {