mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-13 07:33:39 +00:00
Use tower-cell icon for cluster/unknown spots rather than the desktop icon
This commit is contained in:
@@ -300,6 +300,10 @@ class Spot:
|
||||
if self.sig:
|
||||
self.icon = get_icon_for_sig(self.sig)
|
||||
|
||||
# Default "radio" icon if nothing else has set it
|
||||
if not self.icon:
|
||||
self.icon = "tower-cell"
|
||||
|
||||
# DX Grid to lat/lon and vice versa in case one is missing
|
||||
if self.dx_grid and not self.dx_latitude:
|
||||
ll = locator_to_latlong(self.dx_grid)
|
||||
@@ -380,7 +384,7 @@ class Spot:
|
||||
self_copy.received_time_iso = ""
|
||||
self.id = hashlib.sha256(str(self_copy).encode("utf-8")).hexdigest()
|
||||
|
||||
# JSON serialise
|
||||
# JSON sspoterialise
|
||||
def to_json(self):
|
||||
return json.dumps(self, default=lambda o: o.__dict__, sort_keys=True)
|
||||
|
||||
|
||||
@@ -268,8 +268,6 @@ class WebServer:
|
||||
|
||||
# infer missing data, and add it to our database.
|
||||
spot.source = "API"
|
||||
if not spot.sig:
|
||||
spot.icon = "desktop"
|
||||
spot.infer_missing()
|
||||
self.spots.add(spot.id, spot, expire=MAX_SPOT_AGE)
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ class DXCluster(SpotProvider):
|
||||
de_call=match.group(1),
|
||||
freq=float(match.group(2)) * 1000,
|
||||
comment=match.group(4).strip(),
|
||||
icon="desktop",
|
||||
icon="tower-cell",
|
||||
time=spot_datetime.timestamp())
|
||||
|
||||
# Add to our list
|
||||
|
||||
Reference in New Issue
Block a user