From b8a3c223f5d18de5334c9a20fcd8507989349daa Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Fri, 22 May 2026 05:57:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E5=B0=94=E9=87=9C=E5=B1=B1=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E6=A8=A1=E6=9D=BF=E5=90=AF=E7=94=A8=E8=B7=91=E9=81=93?= =?UTF-8?q?=E8=A7=82=E6=B5=8B=E6=A0=BC=E5=BC=8F=EF=BC=8C=E4=B8=8E=E4=B8=AD?= =?UTF-8?q?=E5=9B=BD=E5=9F=8E=E5=B8=82=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Directive: is_amsc 扩展为识别 amos 和 amsc_awos 两种源 --- src/utils/telegram_push.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/telegram_push.py b/src/utils/telegram_push.py index 26dc664b..a216cd5b 100644 --- a/src/utils/telegram_push.py +++ b/src/utils/telegram_push.py @@ -921,7 +921,8 @@ def _build_airport_status_message( runway_pairs = runway_data.get("runway_pairs") or [] runway_temps = runway_data.get("temperatures") or [] point_temps = runway_data.get("point_temperatures") or [] - is_amsc = amos.get("source") == "amsc_awos" + is_amsc = amos.get("source") in ("amsc_awos", "amos") + has_runway = bool(point_temps and (is_amsc or amos.get("runway_obs"))) amos_icao = amos.get("icao") or HIGH_FREQ_AIRPORT_ICAO.get(city, "") settlement_pair = _settlement_runway_for_city(city) @@ -964,8 +965,6 @@ def _build_airport_status_message( wind_label = _wind_regime_label(city, wind_dir) if is_amsc and wind_dir is not None else None max_so_far, max_temp_time = _get_airport_daily_high(city_weather) - has_runway = bool(is_amsc and point_temps) - # ── Build message ── lines: List[str] = []