新增 /ip_profile、/ip_quality API 与网络 UI 组件,默认隐藏摄像头/拉流导航;同步更新 README。 Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
736 B
Python
23 lines
736 B
Python
"""功能开关:隐藏/屏蔽 UI 与 API,保留底层实现文件。"""
|
||
|
||
SHOW_CAMERA_FEATURE = False
|
||
SHOW_PULL_STREAM_FEATURE = False
|
||
|
||
|
||
def is_disabled_stream_worker_pm2(name: str) -> bool:
|
||
low = (name or "").strip().lower()
|
||
if not SHOW_CAMERA_FEATURE and low.startswith("camera"):
|
||
return True
|
||
if not SHOW_PULL_STREAM_FEATURE and low.startswith("pull_stream"):
|
||
return True
|
||
return False
|
||
|
||
|
||
def is_disabled_stream_worker_script(script: str) -> bool:
|
||
stem = (script or "").strip().lower().removesuffix(".py")
|
||
if not SHOW_CAMERA_FEATURE and stem.startswith("camera"):
|
||
return True
|
||
if not SHOW_PULL_STREAM_FEATURE and stem.startswith("pull_stream"):
|
||
return True
|
||
return False
|