mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Alerts now displays a "Type" in the table not just the source. Closes #142
This commit is contained in:
@@ -22,11 +22,18 @@ class Hamsat(HTTPAlertProvider):
|
||||
# Iterate through source data
|
||||
for source_alert in http_response.json()["data"]:
|
||||
# Convert to our alert format
|
||||
freqs_modes = source_alert.get("mode", "")
|
||||
if "mhz" in source_alert:
|
||||
if "mhz_direction" in source_alert:
|
||||
freqs_modes = f"{source_alert['mhz']!s} {source_alert['mhz_direction']}, {freqs_modes}"
|
||||
else:
|
||||
freqs_modes = f"{source_alert['mhz']!s}, {freqs_modes}"
|
||||
|
||||
alert = Alert(
|
||||
source=self.name,
|
||||
source_id=source_alert["id"],
|
||||
dx_calls=[source_alert["callsign"].upper()],
|
||||
freqs_modes=f"{source_alert['mhz']!s} {source_alert['mhz_direction']}, {source_alert['mode']}",
|
||||
freqs_modes=freqs_modes,
|
||||
comment=source_alert["comment"],
|
||||
# Fudge a SIG ref to provide the remaining bits of data we need: the satellite and the operator's grid
|
||||
sig_refs=[
|
||||
|
||||
Reference in New Issue
Block a user