重构无人直播助手:内嵌 youLIVE、摄像头直推、推流诊断与 UI 焕新
将 README 改写为产品文档;移除微信/EasyTier/工作台等遗留模块;新增 youLIVE 目标端监控、摄像头推流、质量守卫与转播历史能力。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
工作台 /client/overview:YouTube 频道摘要、微信绑定摘要。
|
||||
工作台 /client/overview:YouTube 频道摘要。
|
||||
|
||||
多路转播语义:每条线路为「一个抖音直播间 ↔ 一个 YouTube 串流」一对一;
|
||||
禁止同一抖音直播间同时向多个 YouTube 频道推流;禁止多条线路共用同一串流密钥(避免串台)。
|
||||
@@ -12,8 +12,6 @@ import re
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from web2_wechat_chatbot import build_client, load_wechat_chatbot_config, load_wechat_state
|
||||
|
||||
|
||||
def _mask_key(key: str) -> str:
|
||||
k = (key or "").strip()
|
||||
@@ -223,32 +221,12 @@ def _youtube_channels_list(config_dir: Path) -> tuple[list[dict[str, str]], list
|
||||
|
||||
|
||||
def build_client_overview(config_dir: Path, base_dir: Path) -> dict[str, Any]:
|
||||
del base_dir
|
||||
channels, relay_errors, relay_notes = _youtube_channels_list(config_dir)
|
||||
cfg = load_wechat_chatbot_config(base_dir)
|
||||
st = load_wechat_state(base_dir)
|
||||
wechat: dict[str, Any] = {
|
||||
"configured": bool(cfg.get("proxyUrl") and cfg.get("apiKey")),
|
||||
"nickName": st.get("nickName"),
|
||||
"wcId": st.get("wcId"),
|
||||
"online": False,
|
||||
"proxyError": None,
|
||||
}
|
||||
if wechat["configured"]:
|
||||
try:
|
||||
c = build_client(cfg)
|
||||
ps = c.get_status()
|
||||
wechat["online"] = bool(ps.get("isLoggedIn")) or bool(ps.get("wcId"))
|
||||
if ps.get("nickName"):
|
||||
wechat["nickName"] = ps.get("nickName")
|
||||
if ps.get("wcId"):
|
||||
wechat["wcId"] = ps.get("wcId")
|
||||
except Exception as e:
|
||||
wechat["proxyError"] = str(e)[:300]
|
||||
return {
|
||||
"youtubeChannelCount": len(channels),
|
||||
"youtubeChannels": channels,
|
||||
"relayPairingPolicy": "one_douyin_one_youtube",
|
||||
"relayValidationErrors": relay_errors,
|
||||
"relayNotes": relay_notes,
|
||||
"wechat": wechat,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user