From fed5d57b9e5d3df7c34bccb7a120bfa274b2039a Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Mon, 16 Mar 2026 16:52:36 +0100 Subject: Remove vitrasa scheduled-only in 0 minutes --- .../Services/Processors/VitrasaRealTimeProcessor.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/Enmarcha.Backend/Services/Processors/VitrasaRealTimeProcessor.cs b/src/Enmarcha.Backend/Services/Processors/VitrasaRealTimeProcessor.cs index 43152fd..3c27e10 100644 --- a/src/Enmarcha.Backend/Services/Processors/VitrasaRealTimeProcessor.cs +++ b/src/Enmarcha.Backend/Services/Processors/VitrasaRealTimeProcessor.cs @@ -269,6 +269,14 @@ public class VitrasaRealTimeProcessor : AbstractRealTimeProcessor { _logger.LogError(ex, "Error fetching Vitrasa real-time data for stop {StopId}", context.StopId); } + + foreach (var arr in context.Arrivals) + { + if (arr.Estimate.Minutes < 1 && arr.Estimate.Precision == ArrivalPrecision.Scheduled) + { + arr.Delete = true; // Remove arrivals that are scheduled right now, since they are likely already departed + } + } } private static bool IsRouteMatch(string a, string b) -- cgit v1.3