From 3ce586243a49f34b36d0fe4099bbfb2631610f11 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Mon, 16 Mar 2026 13:01:36 +0100 Subject: New marquee generation logic for Xunta --- src/Enmarcha.Backend/Services/FeedService.cs | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'src/Enmarcha.Backend/Services/FeedService.cs') diff --git a/src/Enmarcha.Backend/Services/FeedService.cs b/src/Enmarcha.Backend/Services/FeedService.cs index c3e33fd..4ea3752 100644 --- a/src/Enmarcha.Backend/Services/FeedService.cs +++ b/src/Enmarcha.Backend/Services/FeedService.cs @@ -148,7 +148,7 @@ public class FeedService return result; } - public string NormalizeStopName(string feedId, string name) + public static string NormalizeStopName(string feedId, string name) { if (feedId == "vitrasa") { @@ -171,7 +171,7 @@ public class FeedService return Regex.Replace(normalized, @"[^a-z0-9]", ""); } - public string GetStreetName(string originalName) + public static string GetStreetName(string originalName) { var name = RemoveQuotationMarks.Replace(originalName, "").Trim(); var match = StreetNameRegex.Match(name); @@ -189,29 +189,6 @@ public class FeedService return streetName.Trim(); } - public string? GenerateMarquee(string feedId, List nextStops) - { - if (nextStops.Count == 0) return null; - - if (feedId is "vitrasa" or "tranvias" or "tussa" or "ourense") - { - var streets = nextStops - .Select(GetStreetName) - .Where(s => !string.IsNullOrWhiteSpace(s)) - .Distinct() - .ToList(); - - return string.Join(" - ", streets); - } - - return feedId switch - { - "xunta" => string.Join(" > ", nextStops), - "renfe" => string.Join(" - ", nextStops), - _ => string.Join(", ", nextStops.Take(4)) - }; - } - public bool IsStopHidden(string stopId) { return HiddenStops.Contains(stopId); -- cgit v1.3