"""功能开关:隐藏/屏蔽 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