summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-01-19 11:12:43 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-01-19 11:12:43 +0100
commita1add16883b775bf8a7032df14ed6450e4bd0811 (patch)
tree5e0f786aed8c660bf53ca807d2f11194176732f8 /lib
parentd2c20165d8976d4375195bd1255612422714d670 (diff)
expose and show arr/dep and route platforms
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm b/lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm
index e3bcbf4..840edba 100644
--- a/lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm
+++ b/lib/Travel/Routing/DE/DBRIS/Connection/Segment.pm
@@ -15,8 +15,8 @@ Travel::Routing::DE::DBRIS::Connection::Segment->mk_ro_accessors(
qw(
dep_name dep_eva arr_name arr_eva
train train_long train_mid train_short direction
- sched_dep rt_dep dep
- sched_arr rt_arr arr
+ sched_dep rt_dep dep dep_platform
+ sched_arr rt_arr arr arr_platform
sched_duration rt_duration duration duration_percent
journey_id
occupancy occupancy_first occupancy_second
@@ -135,6 +135,11 @@ sub new {
= [ map { $_->{value} } @{ $json->{transferNotes} // [] } ];
}
+ if ( @{ $ref->{route} // [] } ) {
+ $ref->{dep_platform} = $ref->{route}[0]->platform;
+ $ref->{arr_platform} = $ref->{route}[-1]->platform;
+ }
+
bless( $ref, $obj );
return $ref;