Files
gitlab-instance-0a899031_d2…/web2_feature_flags.py
DESKTOP-77LRNCU\dsx2016 ae9531f2c2 网络页焕新:IP 画像/质量检测、链路诊断与功能开关
新增 /ip_profile、/ip_quality API 与网络 UI 组件,默认隐藏摄像头/拉流导航;同步更新 README。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 12:47:53 +08:00

23 lines
736 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""功能开关:隐藏/屏蔽 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