From 698dbb9ee9bd8e4facefd269d4851aa148912c00 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 8 Oct 2015 13:23:34 +0200 Subject: update for new Travel::Status::DE::URA(::Result) API --- index.pl | 2 +- templates/infoscreen.html.ep | 18 +++--------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/index.pl b/index.pl index 687804d..46f83dd 100644 --- a/index.pl +++ b/index.pl @@ -100,7 +100,7 @@ sub get_results { elsif ( $backend eq 'aseag' ) { $status = Travel::Status::DE::ASEAG->new( stop => ( $city ? "${city} ${stop}" : $stop ), - full_routes => 'after', + calculate_routes => 1, ); } else { diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index 4a4f309..1c0974f 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -46,17 +46,12 @@ % if ($departure->can('lineref') and $departure->lineref) { %= $departure->lineref->route % } -% elsif ($departure->can('route_pre') and $departure->can('route_post')) { -% if ($departure->route_pre) { -%= ($departure->route_pre)[0]->name -% } -% if ($departure->route_post) { -% ($departure->route_post)[-1]->name -% } +% else { +%= $departure->destination % } -% if ($departure->can('route_pre')) { +% if ($departure->isa('Travel::Status::DE::EFA::Result')) { Fahrplan: % for my $stop ($departure->route_pre) { @@ -111,13 +106,6 @@ % } % elsif ($departure->can('lineref') and $departure->lineref) { %= $departure->lineref->route -% } -% elsif ($departure->can('route_timetable')) { -% my @first_deps = ($departure->route_timetable)[0..2]; -% delete $first_deps[2] unless defined $first_deps[2]; -% delete $first_deps[1] unless defined $first_deps[1]; -% delete $first_deps[0] unless defined $first_deps[0]; -%= join(' - ', map { $_->[1] } @first_deps ); % } -- cgit v1.2.3