mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Icon lookup for SIGs in preparation for #47. Improved ZLOTA spotter lookup.
This commit is contained in:
@@ -42,21 +42,9 @@ class ParksNPeaks(HTTPAlertProvider):
|
||||
start_time=start_time,
|
||||
is_dxpedition=False)
|
||||
|
||||
# PNP supports a bunch of programs which should have different icons
|
||||
if alert.sig == "SiOTA":
|
||||
alert.icon = "wheat-awn"
|
||||
elif alert.sig == "ZLOTA":
|
||||
alert.icon = "kiwi-bird"
|
||||
elif alert.sig == "KRMNPA":
|
||||
alert.icon = "earth-oceania"
|
||||
elif alert.sig in ["POTA", "SOTA", "WWFF"]:
|
||||
# Don't care about an icon as this will be rejected anyway, we have better data from POTA/SOTA/WWFF direct
|
||||
alert.icon = ""
|
||||
else:
|
||||
# Unknown programme we've never seen before
|
||||
logging.warn(
|
||||
"PNP alert found with sig " + alert.sig + ", developer needs to add support for this and set an icon!")
|
||||
alert.icon = "question"
|
||||
# Log a warning for the developer if PnP gives us an unknown programme we've never seen before
|
||||
if alert.sig not in ["POTA", "SOTA", "WWFF", "SiOTA", "ZLOTA", "KRMNPA"]:
|
||||
logging.warn("PNP alert found with sig " + alert.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
|
||||
# the alert list.
|
||||
|
||||
Reference in New Issue
Block a user