撤回 METAR 兜底,改走 CWA 10min 实时数据(需配 API key)
This commit is contained in:
@@ -29,7 +29,7 @@ const CITIES: &[(&str, &str, &str, &str, i32, f64, &str)] = &[
|
|||||||
("paris", "巴黎", "LFPB", "Le Bourget", 2, 3.0, "CEST"),
|
("paris", "巴黎", "LFPB", "Le Bourget", 2, 3.0, "CEST"),
|
||||||
("hong kong","香港","HKO","Observatory",8,1.5,"HKT"),
|
("hong kong","香港","HKO","Observatory",8,1.5,"HKT"),
|
||||||
("lau fau shan","流浮山","LFS","Lau Fau Shan",8,1.5,"HKT"),
|
("lau fau shan","流浮山","LFS","Lau Fau Shan",8,1.5,"HKT"),
|
||||||
("taipei", "台北", "RCSS", "Songshan", 8, 1.5, "TST"),
|
("taipei", "台北", "466920", "Songshan", 8, 1.5, "TST"),
|
||||||
];
|
];
|
||||||
|
|
||||||
// ── app state ──
|
// ── app state ──
|
||||||
|
|||||||
@@ -856,7 +856,7 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
|
|||||||
if (
|
if (
|
||||||
city_lower not in self.CITY_METAR_CLUSTERS
|
city_lower not in self.CITY_METAR_CLUSTERS
|
||||||
or "mgm_nearby" in results
|
or "mgm_nearby" in results
|
||||||
or settlement_source in {"hko"}
|
or settlement_source in {"hko", "cwa"}
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
cluster_icaos = self.CITY_METAR_CLUSTERS[city_lower]
|
cluster_icaos = self.CITY_METAR_CLUSTERS[city_lower]
|
||||||
|
|||||||
Reference in New Issue
Block a user