summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-04-28 11:11:47 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-04-28 11:11:47 +0200
commita0c313fcce393792c6552a1f0d5f00b034466c13 (patch)
tree2129f088d2ced602a02a0cc67e8195ddb9924d01 /lib/Travel
parent11a58c8e0292b45694759a07bd150a0fdb852a8f (diff)
Do not mis-detect powercars as Link I
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm
index 64fe913..ea14ec9 100644
--- a/lib/Travel/Status/DE/DBWagenreihung.pm
+++ b/lib/Travel/Status/DE/DBWagenreihung.pm
@@ -709,7 +709,13 @@ sub wagongroup_subtype {
# Less than two wagons are generally inconclusive.
# Exception: BR 631 (Link I) only has a single wagon
- if ( $ml{ $likelihood[0] } < 2 and $likelihood[0] ne '631' ) {
+ if (
+ $ml{ $likelihood[0] } < 2
+ and not($likelihood[0] eq '631'
+ and @wagons == 1
+ and substr( $wagons[0]->uic_id, 0, 2 ) eq '95' )
+ )
+ {
return undef;
}