v0.5.71: matches tab, streamer viewport video load, matchup cross-check.
Add pro watchlist matches page; load streamer clips by viewport tier with posters; harden STRATZ matchup refresh and OpenDota cross hints. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+20
-3
@@ -103,12 +103,21 @@ def diff_snapshots(before: dict[str, str | None], after: dict[str, str | None])
|
||||
return data_changed, assets_changed
|
||||
|
||||
|
||||
def run_script(script: str, *args: str, dry_run: bool = False) -> None:
|
||||
def run_script(script: str, *args: str, dry_run: bool = False, soft_fail: bool = False) -> bool:
|
||||
cmd = [sys.executable, str(ROOT / script), *args]
|
||||
print(f"+ {' '.join(cmd)}", flush=True)
|
||||
if dry_run:
|
||||
return
|
||||
subprocess.run(cmd, cwd=str(ROOT), check=True)
|
||||
return True
|
||||
proc = subprocess.run(cmd, cwd=str(ROOT), check=False)
|
||||
if proc.returncode == 0:
|
||||
return True
|
||||
if soft_fail:
|
||||
print(
|
||||
f"soft-fail: {script} exited {proc.returncode}; continuing",
|
||||
flush=True,
|
||||
)
|
||||
return False
|
||||
raise subprocess.CalledProcessError(proc.returncode, cmd)
|
||||
|
||||
|
||||
def patch_check() -> dict:
|
||||
@@ -137,6 +146,13 @@ def run_patch_linked(*, dry_run: bool = False) -> None:
|
||||
run_script("fetch_item_shop.py", dry_run=dry_run)
|
||||
run_script("fetch_items_meta.py", dry_run=dry_run)
|
||||
run_script("item_fears.py", dry_run=dry_run)
|
||||
# Soft: patch workflow may lack STRATZ token; weekly still does the hard refresh.
|
||||
run_script(
|
||||
"fetch_stratz_meta.py",
|
||||
"--matchups-only",
|
||||
dry_run=dry_run,
|
||||
soft_fail=True,
|
||||
)
|
||||
|
||||
|
||||
def run_daily(*, dry_run: bool = False) -> bool:
|
||||
@@ -162,6 +178,7 @@ def run_daily(*, dry_run: bool = False) -> bool:
|
||||
|
||||
|
||||
def run_weekly(*, dry_run: bool = False) -> None:
|
||||
# Default full matchup refresh (not --resume-matchups); stale cells kept on failure.
|
||||
run_script("fetch_stratz_meta.py", dry_run=dry_run)
|
||||
run_script("fetch_hero_items.py", dry_run=dry_run)
|
||||
run_script("fetch_items_meta.py", dry_run=dry_run)
|
||||
|
||||
Reference in New Issue
Block a user