feat: fix build error

This commit is contained in:
shinya
2025-07-13 12:36:03 +08:00
parent 78fe2485e3
commit 3c8f316ad7
3 changed files with 12 additions and 85 deletions

View File

@@ -16,7 +16,6 @@ import {
savePlayRecord,
toggleFavorite,
} from '@/lib/db.client';
import { type VideoDetail } from '@/lib/fetchVideoDetail.client';
import { SearchResult } from '@/lib/types';
import { getVideoResolutionFromM3u8 } from '@/lib/utils';
@@ -43,7 +42,7 @@ function PlayPageClient() {
>('searching');
const [loadingMessage, setLoadingMessage] = useState('正在搜索播放源...');
const [error, setError] = useState<string | null>(null);
const [detail, setDetail] = useState<VideoDetail | null>(null);
const [detail, setDetail] = useState<SearchResult | null>(null);
// 收藏状态
const [favorited, setFavorited] = useState(false);
@@ -90,7 +89,7 @@ function PlayPageClient() {
const currentIdRef = useRef(currentId);
const videoTitleRef = useRef(videoTitle);
const videoYearRef = useRef(videoYear);
const detailRef = useRef<VideoDetail | null>(detail);
const detailRef = useRef<SearchResult | null>(detail);
const currentEpisodeIndexRef = useRef(currentEpisodeIndex);
// 同步最新值到 refs
@@ -355,7 +354,7 @@ function PlayPageClient() {
// 更新视频地址
const updateVideoUrl = (
detailData: VideoDetail | null,
detailData: SearchResult | null,
episodeIndex: number
) => {
if (