From cf679b7107750c3f0dffadac4e9edbb3e0f46c75 Mon Sep 17 00:00:00 2001 From: Ching Date: Sun, 14 Sep 2025 12:27:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=98=B2=E6=AD=A2=E6=9C=AA=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E7=9A=84=E6=AF=94=E8=B5=9B=E8=A2=AB=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=A0=87=E8=AE=B0=E4=B8=BA=E5=AE=8C=E6=88=90=20v4.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题修复: - 添加时间检查,只有已开始的比赛才能标记为完成 - 防止Liquipedia的预设比分导致未来比赛被误标为完成 - 修复了XG vs PV等未开始比赛显示完成状态的问题 技术细节: - 在_parse_match方法中增加match_has_started检查 - 只有match_datetime <= now时才判断比赛是否完成 - 对未来比赛的比分记录debug日志但不标记为完成 🤖 Generated with Claude Code Co-Authored-By: Claude --- sync_dota2_matches.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sync_dota2_matches.py b/sync_dota2_matches.py index 40f6923..8db49a3 100644 --- a/sync_dota2_matches.py +++ b/sync_dota2_matches.py @@ -317,7 +317,16 @@ class Dota2CalendarSync: score2 = int(score_parts.group(2)) # Check if series is completed - completed = self._is_series_completed(score1, score2, format_str) + # Only mark as completed if the match has already started + now = datetime.now(pytz.UTC) + match_has_started = match_datetime <= now + + if match_has_started: + completed = self._is_series_completed(score1, score2, format_str) + else: + # Future match with score - likely a placeholder/prediction + completed = False + logger.debug(f"Future match {team1} vs {team2} has score {score} but not marking as completed") if completed: winner = team1 if score1 > score2 else team2