From d74112e8c77c6dd3820dd9d1d8294813ddd9f9ce Mon Sep 17 00:00:00 2001 From: mtvpls Date: Wed, 14 Jan 2026 22:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=AD=E6=94=BE=E9=A1=B5=E9=9D=A2=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E8=87=AA=E5=8A=A8=E8=B7=9F=E9=9A=8F=E5=BD=B1=E7=89=87?= =?UTF-8?q?=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/play/page.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 4d0cb8c..e56934d 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -10,6 +10,7 @@ import { usePlaySync } from '@/hooks/usePlaySync'; import { getDoubanDetail } from '@/lib/douban.client'; import { useDownload } from '@/contexts/DownloadContext'; import { getAuthInfoFromBrowserCookie } from '@/lib/auth'; +import { useSite } from '@/components/SiteProvider'; import { deleteFavorite, @@ -86,6 +87,7 @@ function PlayPageClient() { const searchParams = useSearchParams(); const enableComments = useEnableComments(); const { addDownloadTask } = useDownload(); + const { siteName } = useSite(); // 获取 Proxy M3U8 Token const proxyToken = typeof window !== 'undefined' ? process.env.NEXT_PUBLIC_PROXY_M3U8_TOKEN || '' : ''; @@ -465,6 +467,15 @@ function PlayPageClient() { const [videoYear, setVideoYear] = useState(searchParams.get('year') || ''); const [videoCover, setVideoCover] = useState(''); const [videoDoubanId, setVideoDoubanId] = useState(0); + + // 更新浏览器标题 + useEffect(() => { + if (videoTitle) { + document.title = `${siteName} - ${videoTitle}`; + } else { + document.title = siteName; + } + }, [videoTitle, siteName]); // 豆瓣评分数据 const [doubanRating, setDoubanRating] = useState<{ value: number;