Loading lib/DBInfoscreen/Controller/Map.pm +2 −2 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ sub get_hafas_polyline { #say $url; my $res = $ua->get( "https://2.db.transport.rest/trips/${trip_id}?lineName=${line}&polyline=true" => { 'User-Agent' => "dbf.finalrewind.org/${dbf_version}" } )->result; $url => { 'User-Agent' => "dbf.finalrewind.org/${dbf_version}" } ) ->result; if ( $res->is_error ) { return; } Loading lib/DBInfoscreen/Controller/Stationboard.pm +8 −5 Original line number Diff line number Diff line Loading @@ -124,16 +124,19 @@ sub get_hafas_trip_id { my $eva = $train->station_uic; my $dep_ts = DateTime->now( time_zone => 'Europe/Berlin' ); my $url = "https://2.db.transport.rest/stations/${eva}/departures?duration=5&when=$dep_ts"; if ( $train->sched_departure ) { $dep_ts = $train->sched_departure->epoch; $url = "https://2.db.transport.rest/stations/${eva}/departures?duration=5&when=$dep_ts"; } elsif ( $train->sched_arrival ) { $dep_ts = $train->sched_arrival->epoch; $url = "https://2.db.transport.rest/stations/${eva}/arrivals?duration=5&when=$dep_ts"; } my $url = "https://2.db.transport.rest/stations/${eva}/departures?duration=5&when=$dep_ts"; if ( my $content = $cache->get($url) ) { return $content; } Loading @@ -141,8 +144,8 @@ sub get_hafas_trip_id { $ua->request_timeout(2); my $res = $ua->get( "https://2.db.transport.rest/stations/${eva}/departures?duration=5&when=$dep_ts" => { 'User-Agent' => "dbf.finalrewind.org/${dbf_version}" } )->result; $url => { 'User-Agent' => "dbf.finalrewind.org/${dbf_version}" } ) ->result; if ( $res->is_error ) { return; } Loading Loading
lib/DBInfoscreen/Controller/Map.pm +2 −2 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ sub get_hafas_polyline { #say $url; my $res = $ua->get( "https://2.db.transport.rest/trips/${trip_id}?lineName=${line}&polyline=true" => { 'User-Agent' => "dbf.finalrewind.org/${dbf_version}" } )->result; $url => { 'User-Agent' => "dbf.finalrewind.org/${dbf_version}" } ) ->result; if ( $res->is_error ) { return; } Loading
lib/DBInfoscreen/Controller/Stationboard.pm +8 −5 Original line number Diff line number Diff line Loading @@ -124,16 +124,19 @@ sub get_hafas_trip_id { my $eva = $train->station_uic; my $dep_ts = DateTime->now( time_zone => 'Europe/Berlin' ); my $url = "https://2.db.transport.rest/stations/${eva}/departures?duration=5&when=$dep_ts"; if ( $train->sched_departure ) { $dep_ts = $train->sched_departure->epoch; $url = "https://2.db.transport.rest/stations/${eva}/departures?duration=5&when=$dep_ts"; } elsif ( $train->sched_arrival ) { $dep_ts = $train->sched_arrival->epoch; $url = "https://2.db.transport.rest/stations/${eva}/arrivals?duration=5&when=$dep_ts"; } my $url = "https://2.db.transport.rest/stations/${eva}/departures?duration=5&when=$dep_ts"; if ( my $content = $cache->get($url) ) { return $content; } Loading @@ -141,8 +144,8 @@ sub get_hafas_trip_id { $ua->request_timeout(2); my $res = $ua->get( "https://2.db.transport.rest/stations/${eva}/departures?duration=5&when=$dep_ts" => { 'User-Agent' => "dbf.finalrewind.org/${dbf_version}" } )->result; $url => { 'User-Agent' => "dbf.finalrewind.org/${dbf_version}" } ) ->result; if ( $res->is_error ) { return; } Loading