diff --git a/d2ypp2/web-console/components/live-product/LiveYoutubeUnmannedView.tsx b/d2ypp2/web-console/components/live-product/LiveYoutubeUnmannedView.tsx index 8b22573..ae61030 100644 --- a/d2ypp2/web-console/components/live-product/LiveYoutubeUnmannedView.tsx +++ b/d2ypp2/web-console/components/live-product/LiveYoutubeUnmannedView.tsx @@ -220,7 +220,9 @@ function isLivePushingRow(row?: LiveProcRow): boolean { } function procStartBlocked(row?: LiveProcRow): boolean { - return isLivePushingRow(row); + // PM2 already online (waiting_source / monitoring / …) must also lock Start — + // otherwise Pro lane “开始” stays clickable after start until ffmpeg is_pushing. + return isLivePushingRow(row) || pm2StatusOnline(row?.process_status); } function proLaneStatusLabel(row: LiveProcRow | undefined, t: TFn): string { @@ -696,7 +698,8 @@ function LiveStreamActionBtn({ const actionForBusy = busyKind ?? kind; const loading = !!(forThisProc && pb.action === actionForBusy); const siblingBusy = !!(forThisProc && pb.action !== actionForBusy); - const blockStart = kind === "start" && pushing; + // Start locks on pushing OR process online (waiting source still counts as started). + const blockStart = kind === "start" && (pushing || online); const blockStop = kind === "stop" && !online; const blockRestart = kind === "restart" && !online; const blocked = blockStart || blockStop || blockRestart; @@ -709,7 +712,11 @@ function LiveStreamActionBtn({ return; } if (blockStart) { - notify(t("已在推流中,无需重复开始", "Already pushing")); + notify( + pushing + ? t("已在推流中,无需重复开始", "Already pushing") + : t("进程已在运行,请用「停止」或「重新开始」", "Already running — use Stop or Restart"), + ); return; } if (blockStop) {