feat: add uniapp match live stream switching
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
MATCH_API = ROOT / "uniapp" / "src" / "api" / "match.ts"
|
||||
MATCH_DETAIL = ROOT / "uniapp" / "src" / "pages" / "match_detail" / "match_detail.vue"
|
||||
MATCH_LIVE_POPUP = ROOT / "uniapp" / "src" / "components" / "match-live-popup" / "match-live-popup.vue"
|
||||
|
||||
|
||||
def read_text(path: Path) -> str:
|
||||
return path.read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
assert MATCH_LIVE_POPUP.exists(), f"missing popup component: {MATCH_LIVE_POPUP}"
|
||||
|
||||
detail_source = read_text(MATCH_DETAIL)
|
||||
popup_source = read_text(MATCH_LIVE_POPUP)
|
||||
api_source = read_text(MATCH_API)
|
||||
|
||||
assert "live_list" in detail_source, "match detail should handle live_list"
|
||||
assert "MatchLivePopup" in detail_source, "match detail should use MatchLivePopup"
|
||||
assert "play_url_m3u8" in popup_source, "popup should support play_url_m3u8"
|
||||
assert "stream_options" in popup_source, "popup should support stream_options"
|
||||
assert "/pages/webview/webview?url=" in popup_source, "selected stream should route through existing webview page"
|
||||
|
||||
assert "/match/detail" in api_source, "match detail API path should stay on /match/detail"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user