Skip to content
GitLab
Explore
Sign in
derf
db-infoscreen
Compare revisions
7b245833632b10ef08848833fc6c2934682f0c19 to 83fdae2c47289d837832286d4684fdd5b493b6c8
Commits on Source (3)
update cpanfile.snapshot
· 80ba6df8
Birte Kristina Friesel
authored
Apr 13, 2024
80ba6df8
station name: remove ÖBB workaround (fixed in HAFAS 6.02)
· 97531495
Birte Kristina Friesel
authored
Apr 13, 2024
97531495
train details: always get details from HAFAS Journey object
· 83fdae2c
Birte Kristina Friesel
authored
Apr 13, 2024
83fdae2c
Hide whitespace changes
Inline
Side-by-side
cpanfile.snapshot
View file @
83fdae2c
...
...
@@ -354,15 +354,15 @@ DISTRIBUTIONS
parent 0
strict 0
warnings 0
DateTime-Locale-1.4
0
pathname: D/DR/DROLSKY/DateTime-Locale-1.4
0
.tar.gz
DateTime-Locale-1.4
1
pathname: D/DR/DROLSKY/DateTime-Locale-1.4
1
.tar.gz
provides:
DateTime::Locale 1.4
0
DateTime::Locale::Base 1.4
0
DateTime::Locale::Catalog 1.4
0
DateTime::Locale::Data 1.4
0
DateTime::Locale::FromData 1.4
0
DateTime::Locale::Util 1.4
0
DateTime::Locale 1.4
1
DateTime::Locale::Base 1.4
1
DateTime::Locale::Catalog 1.4
1
DateTime::Locale::Data 1.4
1
DateTime::Locale::FromData 1.4
1
DateTime::Locale::Util 1.4
1
requirements:
Carp 0
Dist::CheckConflicts 0.02
...
...
@@ -1842,18 +1842,18 @@ DISTRIBUTIONS
Test::Pod 0
Travel::Status::DE::IRIS 1.2
perl v5.20.0
Travel-Status-DE-DeutscheBahn-6.0
1
pathname: D/DE/DERF/Travel-Status-DE-DeutscheBahn-6.0
1
.tar.gz
provides:
Travel::Status::DE::DeutscheBahn 6.0
1
Travel::Status::DE::HAFAS 6.0
1
Travel::Status::DE::HAFAS::Journey 6.0
1
Travel::Status::DE::HAFAS::Location 6.0
1
Travel::Status::DE::HAFAS::Message 6.0
1
Travel::Status::DE::HAFAS::Polyline 6.0
1
Travel::Status::DE::HAFAS::Product 6.0
1
Travel::Status::DE::HAFAS::Stop 6.0
1
Travel::Status::DE::HAFAS::StopFinder 6.0
1
Travel-Status-DE-DeutscheBahn-6.0
2
pathname: D/DE/DERF/Travel-Status-DE-DeutscheBahn-6.0
2
.tar.gz
provides:
Travel::Status::DE::DeutscheBahn 6.0
2
Travel::Status::DE::HAFAS 6.0
2
Travel::Status::DE::HAFAS::Journey 6.0
2
Travel::Status::DE::HAFAS::Location 6.0
2
Travel::Status::DE::HAFAS::Message 6.0
2
Travel::Status::DE::HAFAS::Polyline 6.0
2
Travel::Status::DE::HAFAS::Product 6.0
2
Travel::Status::DE::HAFAS::Stop 6.0
2
Travel::Status::DE::HAFAS::StopFinder 6.0
2
requirements:
Carp 0
Class::Accessor 0.16
...
...
lib/DBInfoscreen/Controller/Stationboard.pm
View file @
83fdae2c
...
...
@@ -518,19 +518,6 @@ sub handle_request {
(
$status
->
station
?
$status
->
station
->
{
name
}
:
$station
),
};
# Travel::Status::DE::HAFAS mis-detects ÖBB station names
if
(
$hafas
and
$hafas
eq
'
ÖBB
'
and
@
{
$status
->
station
->
{
names
}
//
[]
}
>
1
)
{
$data
->
{
station_name
}
=
$station
;
}
elsif
(
$status
->
station
and
$status
->
station
->
{
names
}
)
{
$data
->
{
station_name
}
=
List::Util::
reduce
{
length
(
$a
)
<
length
(
$b
)
?
$a
:
$b
}
@
{
$status
->
station
->
{
names
}
};
}
if
(
not
@
{
$data
->
{
results
}
}
and
$template
eq
'
json
'
)
{
$self
->
handle_no_results_json
(
$station
,
$data
,
$api_version
);
return
;
...
...
@@ -1183,20 +1170,26 @@ sub train_details {
$res
->
{
trip_id
}
=
$journey
->
id
;
$res
->
{
date
}
=
$route
->
[
0
]{
sched_dep
}
//
$route
->
[
0
]{
dep
};
if
(
not
$res
->
{
train_type
}
)
{
my
$train_type
=
$res
->
{
train_type
}
=
$journey
->
type
//
q{}
;
my
$train_no
=
$res
->
{
train_no
}
=
$journey
->
number
//
q{}
;
$res
->
{
train_line
}
=
$journey
->
line_no
//
q{}
;
$self
->
stash
(
title
=
>
$
train_type
.
'
'
.
(
$train_no
||
$res
->
{
train_line
}
)
);
my
$product
=
$journey
->
product
;
if
(
my
$req_name
=
$self
->
param
('
highlight
')
)
{
if
(
my
$p
=
$journey
->
product_at
(
$req_name
)
)
{
$product
=
$
p
;
}
}
if
(
not
defined
$journey
->
class
)
{
my
$train_type
=
$res
->
{
train_type
}
=
$product
->
type
//
q{}
;
my
$train_no
=
$res
->
{
train_no
}
=
$product
->
number
//
q{}
;
$res
->
{
train_line
}
=
$product
->
line_no
//
q{}
;
$self
->
stash
(
title
=>
$train_type
.
'
'
.
(
$train_no
||
$res
->
{
train_line
}
)
);
if
(
not
defined
$product
->
class
)
{
$linetype
=
'
ext
';
}
else
{
my
$prod
=
$self
->
class_to_product
(
$hafas_obj
)
->
{
$
journey
->
class
}
=
$self
->
class_to_product
(
$hafas_obj
)
->
{
$
product
->
class
}
//
q{}
;
if
(
$prod
eq
'
ice
'
or
$prod
eq
'
ic_ec
'
)
{
$linetype
=
'
fern
';
...
...