summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-12-27 20:12:12 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-12-27 20:12:12 +0100
commit0b342f0d6ef9d28bf6f320de8de04a834b6762b9 (patch)
tree50e389dc42f8c7fd11aa81021f2e45a4a451214d
parenteade158164e93484c1ca00e5005ce66bef58c704 (diff)
grep_suggestions: fix via_count handling (oops)
-rw-r--r--lib/Travelynx/Helper/DBRIS.pm8
-rw-r--r--lib/Travelynx/Helper/EFA.pm4
-rw-r--r--lib/Travelynx/Helper/IRIS.pm4
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/Travelynx/Helper/DBRIS.pm b/lib/Travelynx/Helper/DBRIS.pm
index 6441a98..7d402df 100644
--- a/lib/Travelynx/Helper/DBRIS.pm
+++ b/lib/Travelynx/Helper/DBRIS.pm
@@ -248,10 +248,10 @@ sub grep_suggestions {
and $dep->destination eq $dest->{name} )
{
if ( not $dep->is_cancelled ) {
- $via_count{ $dep->stop_eva } += 1;
+ $via_count{ $dest->{name} } += 1;
}
if ( $max_per_dest
- and $via_count{ $dep->stop_eva } > $max_per_dest )
+ and $via_count{ $dest->{name} } > $max_per_dest )
{
next destination;
}
@@ -261,10 +261,10 @@ sub grep_suggestions {
for my $via_name ( $dep->via ) {
if ( $via_name eq $dest->{name} ) {
if ( not $dep->is_cancelled ) {
- $via_count{ $dep->stop_eva } += 1;
+ $via_count{ $dest->{name} } += 1;
}
if ( $max_per_dest
- and $via_count{ $dep->stop_eva } > $max_per_dest )
+ and $via_count{ $dest->{name} } > $max_per_dest )
{
next destination;
}
diff --git a/lib/Travelynx/Helper/EFA.pm b/lib/Travelynx/Helper/EFA.pm
index f717f1e..1ed2b5f 100644
--- a/lib/Travelynx/Helper/EFA.pm
+++ b/lib/Travelynx/Helper/EFA.pm
@@ -62,10 +62,10 @@ sub grep_suggestions {
for my $stop ( $dep->route_post ) {
if ( $stop->full_name eq $dest->{name} ) {
if ( not $dep->is_cancelled ) {
- $via_count{ $dep->stop_id_num } += 1;
+ $via_count{ $dest->{name} } += 1;
}
if ( $max_per_dest
- and $via_count{ $dep->stop_id_num } > $max_per_dest )
+ and $via_count{ $dest->{name} } > $max_per_dest )
{
next destination;
}
diff --git a/lib/Travelynx/Helper/IRIS.pm b/lib/Travelynx/Helper/IRIS.pm
index 7a4a274..4351d1d 100644
--- a/lib/Travelynx/Helper/IRIS.pm
+++ b/lib/Travelynx/Helper/IRIS.pm
@@ -249,10 +249,10 @@ sub grep_suggestions {
for my $via_name ( $dep->route_post ) {
if ( $via_name eq $dest->{name} ) {
if ( not $dep->departure_is_cancelled ) {
- $via_count{ $dep->station_uic } += 1;
+ $via_count{ $dest->{name} } += 1;
}
if ( $max_per_dest
- and $via_count{ $dep->station_uic } > $max_per_dest )
+ and $via_count{ $dest->{name} } > $max_per_dest )
{
next destination;
}