From 605b629d439e2ca137b460dd330bf0663db0a8f4 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Fri, 14 Aug 2026 14:32:42 +0100 Subject: [PATCH] Fix ZLOTA location lookup --- providers/sigrefdata/zlota.py | 10 +++++----- providers/spot/zlota.py | 1 - 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, 20 insertions(+), 21 deletions(-) diff --git a/providers/sigrefdata/zlota.py b/providers/sigrefdata/zlota.py index c960c2a..f0cb1be 100644 --- a/providers/sigrefdata/zlota.py +++ b/providers/sigrefdata/zlota.py @@ -22,16 +22,16 @@ class ZLOTA(FileDownloadSIGRefDataProvider): if isinstance(data, list): for ref in data: ref_id = ref["code"] - latitude = ref["y"] - longitude = ref["x"] + latitude = ref["latitude"] + longitude = ref["longitude"] - ref = SIGRef(sig=self.SIG, id=ref_id, name=ref["name"], + new_ref = SIGRef(sig=self.SIG, id=ref_id, name=ref["name"], url="https://ontheair.nz/assets/" + ref_id.replace("/", "_"), latitude=latitude, longitude=longitude) if latitude and longitude: - ref.grid = latlong_to_locator(latitude, longitude, 6) - new_data.append(ref) + ref.new_ref = latlong_to_locator(latitude, longitude, 6) + new_data.append(new_ref) # Bail out if a stop has been requested, i.e. the program is shutting down - no need to parse the rest # of the data in this case diff --git a/providers/spot/zlota.py b/providers/spot/zlota.py index 788ee35..164cb00 100644 --- a/providers/spot/zlota.py +++ b/providers/spot/zlota.py @@ -12,7 +12,6 @@ class ZLOTA(HTTPSpotProvider): POLL_INTERVAL_SEC = 120 SPOTS_URL = "https://ontheair.nz/api/spots?zlota_only=true" - LIST_URL = "https://ontheair.nz/assets/assets.json" def __init__(self, provider_config): super().__init__("ZLOTA", provider_config, self.SPOTS_URL, self.POLL_INTERVAL_SEC) diff --git a/templates/add_spot.html b/templates/add_spot.html index 424da73..3771e26 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 1f0369c..cc3c16f 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -82,7 +82,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index dae3fff..f8a2cf4 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -79,8 +79,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 96b3efc..51b32a5 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 d089a78..73366fc 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index 3f7e443..76602e3 100644 --- a/templates/map.html +++ b/templates/map.html @@ -112,8 +112,8 @@ - - + + diff --git a/templates/spots.html b/templates/spots.html index 2758d85..ab915e9 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -118,8 +118,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index 5ff943c..b7f18c0 100644 --- a/templates/status.html +++ b/templates/status.html @@ -86,7 +86,7 @@ - +