Loading lib/Travelynx.pm +7 −0 Original line number Diff line number Diff line Loading @@ -1615,6 +1615,13 @@ sub startup { rt_arrival => ( $stop->[2]{rt_arr} || $stop->[2]{sched_arr} ) ); if ($stop->[2]{platform}) { $self->in_transit->set_arrival_platform( uid => $uid, db => $db, arrival_platform => $stop->[2]{platform} ); } if ( $now > ( $stop->[2]{rt_arr} || $stop->[2]{sched_arr} ) ) { Loading lib/Travelynx/Model/InTransit.pm +24 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,7 @@ sub add { isCancelled => $j_stop->is_cancelled, arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, efa_load => $j_stop->occupancy, lat => $j_stop->latlon->[0], lon => $j_stop->latlon->[1], Loading Loading @@ -214,6 +215,7 @@ sub add { rt_dep => _epoch( $j_stop->rt_dep ), arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, load => $j_stop->load, lat => $j_stop->loc->lat, lon => $j_stop->loc->lon, Loading Loading @@ -284,6 +286,7 @@ sub add { isCancelled => $j_stop->is_cancelled, arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, load => { FIRST => $j_stop->occupancy_first, SECOND => $j_stop->occupancy_second Loading Loading @@ -364,6 +367,7 @@ sub add { _epoch( $journey_stopover->realtime_departure ), arr_delay => $journey_stopover->arrival_delay, dep_delay => $journey_stopover->departure_delay, platform => $journey_stopover->track, lat => $journey_stopover->stop->lat, lon => $journey_stopover->stop->lon, } Loading Loading @@ -770,6 +774,22 @@ sub set_arrival_eva { ); } sub set_arrival_platform { my ( $self, %opt ) = @_; my $uid = $opt{uid}; my $db = $opt{db} // $self->{pg}->db; my $platform = $opt{arrival_platform}; $db->update( 'in_transit', { arr_platform => $platform, }, { user_id => $uid } ); } sub set_arrival_times { my ( $self, %opt ) = @_; Loading Loading @@ -1235,6 +1255,7 @@ sub update_arrival_dbris { isCancelled => $j_stop->is_cancelled, arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, load => { FIRST => $j_stop->occupancy_first, SECOND => $j_stop->occupancy_second Loading Loading @@ -1302,6 +1323,7 @@ sub update_arrival_efa { isCancelled => $j_stop->is_cancelled, arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, efa_load => $j_stop->occupancy, lat => $j_stop->latlon->[0], lon => $j_stop->latlon->[1], Loading Loading @@ -1356,6 +1378,7 @@ sub update_arrival_motis { rt_dep => _epoch( $journey_stopover->realtime_departure ), arr_delay => $journey_stopover->arrival_delay, dep_delay => $journey_stopover->departure_delay, platform => $journey_stopover->track, lat => $journey_stopover->stop->lat, lon => $journey_stopover->stop->lon, } Loading Loading @@ -1416,6 +1439,7 @@ sub update_arrival_hafas { rt_dep => _epoch( $j_stop->rt_dep ), arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, load => $j_stop->load, lat => $j_stop->loc->lat, lon => $j_stop->loc->lon, Loading Loading
lib/Travelynx.pm +7 −0 Original line number Diff line number Diff line Loading @@ -1615,6 +1615,13 @@ sub startup { rt_arrival => ( $stop->[2]{rt_arr} || $stop->[2]{sched_arr} ) ); if ($stop->[2]{platform}) { $self->in_transit->set_arrival_platform( uid => $uid, db => $db, arrival_platform => $stop->[2]{platform} ); } if ( $now > ( $stop->[2]{rt_arr} || $stop->[2]{sched_arr} ) ) { Loading
lib/Travelynx/Model/InTransit.pm +24 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,7 @@ sub add { isCancelled => $j_stop->is_cancelled, arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, efa_load => $j_stop->occupancy, lat => $j_stop->latlon->[0], lon => $j_stop->latlon->[1], Loading Loading @@ -214,6 +215,7 @@ sub add { rt_dep => _epoch( $j_stop->rt_dep ), arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, load => $j_stop->load, lat => $j_stop->loc->lat, lon => $j_stop->loc->lon, Loading Loading @@ -284,6 +286,7 @@ sub add { isCancelled => $j_stop->is_cancelled, arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, load => { FIRST => $j_stop->occupancy_first, SECOND => $j_stop->occupancy_second Loading Loading @@ -364,6 +367,7 @@ sub add { _epoch( $journey_stopover->realtime_departure ), arr_delay => $journey_stopover->arrival_delay, dep_delay => $journey_stopover->departure_delay, platform => $journey_stopover->track, lat => $journey_stopover->stop->lat, lon => $journey_stopover->stop->lon, } Loading Loading @@ -770,6 +774,22 @@ sub set_arrival_eva { ); } sub set_arrival_platform { my ( $self, %opt ) = @_; my $uid = $opt{uid}; my $db = $opt{db} // $self->{pg}->db; my $platform = $opt{arrival_platform}; $db->update( 'in_transit', { arr_platform => $platform, }, { user_id => $uid } ); } sub set_arrival_times { my ( $self, %opt ) = @_; Loading Loading @@ -1235,6 +1255,7 @@ sub update_arrival_dbris { isCancelled => $j_stop->is_cancelled, arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, load => { FIRST => $j_stop->occupancy_first, SECOND => $j_stop->occupancy_second Loading Loading @@ -1302,6 +1323,7 @@ sub update_arrival_efa { isCancelled => $j_stop->is_cancelled, arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, efa_load => $j_stop->occupancy, lat => $j_stop->latlon->[0], lon => $j_stop->latlon->[1], Loading Loading @@ -1356,6 +1378,7 @@ sub update_arrival_motis { rt_dep => _epoch( $journey_stopover->realtime_departure ), arr_delay => $journey_stopover->arrival_delay, dep_delay => $journey_stopover->departure_delay, platform => $journey_stopover->track, lat => $journey_stopover->stop->lat, lon => $journey_stopover->stop->lon, } Loading Loading @@ -1416,6 +1439,7 @@ sub update_arrival_hafas { rt_dep => _epoch( $j_stop->rt_dep ), arr_delay => $j_stop->arr_delay, dep_delay => $j_stop->dep_delay, platform => $j_stop->platform, load => $j_stop->load, lat => $j_stop->loc->lat, lon => $j_stop->loc->lon, Loading