Start work on bands display. #48

This commit is contained in:
Ian Renton
2025-10-20 18:44:51 +01:00
parent 53977c5306
commit 6ca9f28a56
7 changed files with 365 additions and 23 deletions

View File

@@ -39,6 +39,7 @@ class WebServer:
# Routes for templated pages
bottle.get("/")(lambda: self.serve_template('webpage_spots'))
bottle.get("/map")(lambda: self.serve_template('webpage_map'))
bottle.get("/bands")(lambda: self.serve_template('webpage_bands'))
bottle.get("/alerts")(lambda: self.serve_template('webpage_alerts'))
bottle.get("/status")(lambda: self.serve_template('webpage_status'))
bottle.get("/about")(lambda: self.serve_template('webpage_about'))
@@ -224,6 +225,16 @@ class WebServer:
case "comment_includes":
comment_includes = query.get(k).strip()
spots = [s for s in spots if s.comment and comment_includes.upper() in s.comment.upper()]
case "allow_qrt":
# If false, spots that are flagged as QRT are not returned.
prevent_qrt = query.get(k).upper() == "FALSE"
if prevent_qrt:
spots = [s for s in spots if not s.qrt or s.qrt == False]
case "needs_location":
# If true, spots require a location to be returned
needs_location = query.get(k).upper() == "TRUE"
if needs_location:
spots = [s for s in spots if s.latitude and s.longitude]
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