mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Get ZLOTA spots from its own API rather than PnP. Closes #37
This commit is contained in:
@@ -49,7 +49,8 @@ class ParksNPeaks(HTTPAlertProvider):
|
||||
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.
|
||||
# the alert list. Note that while ZLOTA has its own spots API, it doesn't have its own alerts API. So that
|
||||
# means the PnP *spot* provider rejects ZLOTA spots here, but the PnP *alerts* provider here allows ZLOTA.
|
||||
if alert.sig not in ["POTA", "SOTA", "WWFF"]:
|
||||
new_alerts.append(alert)
|
||||
return new_alerts
|
||||
|
||||
@@ -5,6 +5,7 @@ import pytz
|
||||
from rss_parser import RSSParser
|
||||
|
||||
from alertproviders.http_alert_provider import HTTPAlertProvider
|
||||
from core.sig_utils import get_icon_for_sig
|
||||
from data.alert import Alert
|
||||
|
||||
|
||||
@@ -51,7 +52,7 @@ class WOTA(HTTPAlertProvider):
|
||||
sig="WOTA",
|
||||
sig_refs=[ref] if ref else [],
|
||||
sig_refs_names=[ref_name] if ref_name else [],
|
||||
icon="mound",
|
||||
icon=get_icon_for_sig("WOTA"),
|
||||
start_time=time.timestamp())
|
||||
|
||||
# Add to our list.
|
||||
|
||||
Reference in New Issue
Block a user