From 757071972ae96440e2d2278c116155750ac2a71d Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Sun, 21 Jun 2026 21:50:18 +0100 Subject: [PATCH] Checking for some extra PnP Classes --- alertproviders/parksnpeaks.py | 10 ++++++++-- spotproviders/parksnpeaks.py | 2 +- templates/add_spot.html | 2 +- templates/alerts.html | 2 +- templates/bands.html | 4 ++-- templates/base.html | 10 +++++----- templates/conditions.html | 2 +- templates/map.html | 4 ++-- templates/spots.html | 4 ++-- templates/status.html | 2 +- 10 files changed, 24 insertions(+), 18 deletions(-) diff --git a/alertproviders/parksnpeaks.py b/alertproviders/parksnpeaks.py index ad288eb..010d99c 100644 --- a/alertproviders/parksnpeaks.py +++ b/alertproviders/parksnpeaks.py @@ -33,18 +33,24 @@ class ParksNPeaks(HTTPAlertProvider): start_time = datetime.strptime(source_alert["alTime"], "%Y-%m-%d %H:%M:%S").replace( tzinfo=pytz.UTC).timestamp() + sigrefs = [] + # PnP can give us an alert of class "QRP" which is the only one that's not a real SIG in Spothole's list, + # so mask this out if we got it. + if sig != "QRP": + sigrefs = [SIGRef(id=sig_ref, sig=sig, name=sig_ref_name)] + # Convert to our alert format alert = Alert(source=self.name, source_id=source_alert["alID"], dx_calls=[source_alert["CallSign"].upper()], freqs_modes=source_alert["Freq"] + " " + source_alert["MODE"], comment=source_alert["Comments"], - sig_refs=[SIGRef(id=sig_ref, sig=sig, name=sig_ref_name)], + sig_refs=sigrefs, start_time=start_time, is_dxpedition=False) # Log a warning for the developer if PnP gives us an unknown programme we've never seen before - if sig and sig not in ["POTA", "SOTA", "WWFF", "SiOTA", "ZLOTA", "KRMNPA"]: + if sig and sig not in ["POTA", "SOTA", "WWFF", "SiOTA", "ZLOTA", "KRMNPA", "LLOTA", "QRP"]: logging.warning("PNP alert found with sig " + sig + ", developer needs to add support for this!") # If this is POTA, SOTA or WWFF data we already have it through other means, so ignore. Otherwise, add to diff --git a/spotproviders/parksnpeaks.py b/spotproviders/parksnpeaks.py index bac7c99..6b5b573 100644 --- a/spotproviders/parksnpeaks.py +++ b/spotproviders/parksnpeaks.py @@ -57,7 +57,7 @@ class ParksNPeaks(HTTPSpotProvider): sig_refs[0].name = source_spot["actLocation"] # Log a warning for the developer if PnP gives us an unknown programme we've never seen before - if sig not in ["POTA", "SOTA", "WWFF", "SIOTA", "ZLOTA", "KRMNPA"]: + if sig not in ["POTA", "SOTA", "WWFF", "SIOTA", "ZLOTA", "KRMNPA", "LLOTA"]: logging.warning("PNP spot found with sig " + sig + ", developer needs to add support for this!") # Add new spot to the list diff --git a/templates/add_spot.html b/templates/add_spot.html index 7843268..c1b0238 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -76,7 +76,7 @@ - + diff --git a/templates/alerts.html b/templates/alerts.html index d7e7c3e..4dfa4fe 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -75,7 +75,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index f803b83..81ca9ab 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -77,8 +77,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 20f22c1..4e2aeea 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -10,10 +10,10 @@ - - - - + + + + {% end %} {% block body %}
diff --git a/templates/conditions.html b/templates/conditions.html index b236d74..6dbfc53 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index 42e48d6..e623765 100644 --- a/templates/map.html +++ b/templates/map.html @@ -95,8 +95,8 @@ - - + + diff --git a/templates/spots.html b/templates/spots.html index 4b6e1e7..0bdca08 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -116,8 +116,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index c736898..b49cbfc 100644 --- a/templates/status.html +++ b/templates/status.html @@ -59,7 +59,7 @@ - +