summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Travel/Status/DE/DBRIS/Location.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/DBRIS/Location.pm b/lib/Travel/Status/DE/DBRIS/Location.pm
index 63b26ac..c397b60 100644
--- a/lib/Travel/Status/DE/DBRIS/Location.pm
+++ b/lib/Travel/Status/DE/DBRIS/Location.pm
@@ -50,6 +50,22 @@ sub new {
= $opt{strptime_obj}->parse_datetime( $json->{ezAnkunftsZeitpunkt} );
}
+ for my $message ( @{ $json->{priorisierteMeldungen} // [] } ) {
+ if ( $message->{type} and $message->{type} eq 'HALT_AUSFALL' ) {
+ $ref->{is_cancelled} = 1;
+ }
+ push( @{ $ref->{messages} }, $message );
+ }
+
+ for my $message ( @{ $json->{risMeldungen} // [] } ) {
+ if ( $message->{key}
+ and $message->{key} eq 'text.realtime.stop.cancelled' )
+ {
+ $ref->{is_cancelled} = 1;
+ }
+ $ref->{ris_messages}{ $message->{key} } = $message->{value};
+ }
+
$ref->{arr} = $ref->{rt_arr} // $ref->{sched_arr};
$ref->{dep} = $ref->{rt_dep} // $ref->{sched_dep};
$ref->{platform} = $ref->{rt_platform} // $ref->{sched_platform};