This commit is contained in:
eric
2026-05-19 09:19:52 +00:00
parent 585bcd9500
commit b617555360
30 changed files with 477 additions and 207 deletions

View File

@@ -132,7 +132,7 @@ function resolveChannelPm2(channel: YoutubeProChannel): string {
}
const MODE_KEY = "live-hub-youtube-mode-v1";
const PRO_PM2_RESERVED = new Set(["tiktok", "obs", "web"]);
const PRO_PM2_RESERVED = new Set(["youtube", "douyin_youtube", "tiktok", "obs", "web"]);
/** UI 暂时隐藏「多频道 Pro」切换DOM 与逻辑保留,改 false 即可恢复) */
const HIDE_YOUTUBE_MULTI_PRO_TOGGLE = false;
@@ -337,7 +337,6 @@ export function LiveYoutubeUnmannedView({
quickLinks,
}: Props) {
const ytEntries = useMemo(() => entries.filter(isYoutubeProcess), [entries]);
const staticYoutubeEntries = useMemo(() => ytEntries.filter((entry) => isStaticYoutubeControlEntry(entry)), [ytEntries]);
const singleProcessOptions = useMemo(
() => buildSingleProcessOptions(ytEntries.length ? ytEntries : entries, liveProcesses),
[entries, liveProcesses, ytEntries],
@@ -713,11 +712,7 @@ export function LiveYoutubeUnmannedView({
if (m === "pro" && channels.length) {
const first = channels[0];
const latestSingleUrlDraft = singleUrlDraftRef.current.trim();
const youtubePm2Ok = staticYoutubeEntries.some((e) => e.pm2 === currentProc);
const pm2Name =
youtubePm2Ok && currentProc.trim()
? currentProc.trim()
: resolveChannelPm2(first);
const pm2Name = resolveChannelPm2(first);
const next: YoutubeProChannel[] = [
{
...first,
@@ -744,8 +739,6 @@ export function LiveYoutubeUnmannedView({
channels,
applyProUrlDraft,
ytFields.key,
currentProc,
staticYoutubeEntries,
activeCh,
persistChannels,
],