From d0f99c1235bf2bcffbde27c9e0b2b6fa62341e44 Mon Sep 17 00:00:00 2001 From: "April P." Date: Wed, 14 May 2025 13:10:10 -0700 Subject: [PATCH] Filter out duplicate location keys when pulling from the i2's MPC file (Fixes #9) --- MistWX-i2Me/Program.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MistWX-i2Me/Program.cs b/MistWX-i2Me/Program.cs index 4ad5389..5bfff88 100644 --- a/MistWX-i2Me/Program.cs +++ b/MistWX-i2Me/Program.cs @@ -137,11 +137,16 @@ public class Program continue; } - try { string choppedValue = i.Value.ToString().Split("_")[2]; + // Avoid duplicate locations from being added to the location list + if (locations.Contains(choppedValue)) + { + continue; + } + locations.Add(choppedValue); } catch (Exception ex)