diff --git a/server/webserver.py b/server/webserver.py index 4e34811..0b53c28 100644 --- a/server/webserver.py +++ b/server/webserver.py @@ -241,17 +241,19 @@ class WebServer: if needs_good_location: spots = [s for s in spots if s.dx_location_good] case "dedupe": - # Ensure only the latest spot of each callsign is present in the list. This relies on the list being - # in reverse time order, so if any future change allows re-ordering the list, that should be done - # *after* this. + # Ensure only the latest spot of each callsign-SSID combo is present in the list. This relies on the + # list being in reverse time order, so if any future change allows re-ordering the list, that should + # be done *after* this. SSIDs are deliberately included here (see issue #68) because e.g. M0TRT-7 + # and M0TRT-9 APRS transponders could well be in different locations, on different frequencies etc. dedupe = query.get(k).upper() == "TRUE" if dedupe: spots_temp = [] already_seen = [] for s in spots: - if s.dx_call not in already_seen: + call_plus_ssid = s.dx_call + (s.dx_ssid if s.dx_ssid else "") + if call_plus_ssid not in already_seen: spots_temp.append(s) - already_seen.append(s.dx_call) + already_seen.append(call_plus_ssid) spots = spots_temp # If we have a "limit" parameter, we apply that last, regardless of where it appeared in the list of keys. if "limit" in query.keys(): diff --git a/spotproviders/aprsis.py b/spotproviders/aprsis.py index 1ddfa30..30b089c 100644 --- a/spotproviders/aprsis.py +++ b/spotproviders/aprsis.py @@ -37,10 +37,10 @@ class APRSIS(SpotProvider): def handle(self, data): # Split SSID in "from" call and store separately - from_parts = data["from"].split("-") + from_parts = data["from"].split("-").upper() dx_call = from_parts[0] dx_ssid = from_parts[1] if len(from_parts) > 1 else None - via_parts = data["via"].split("-") + via_parts = data["via"].split("-").upper() de_call = via_parts[0] de_ssid = via_parts[1] if len(via_parts) > 1 else None spot = Spot(source="APRS-IS",