mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-17 19:27:29 +08:00
fix: try to fix year
This commit is contained in:
@@ -719,8 +719,9 @@ function PlayPageClient() {
|
|||||||
const newDetail = await fetchVideoDetail({
|
const newDetail = await fetchVideoDetail({
|
||||||
source: newSource,
|
source: newSource,
|
||||||
id: newId,
|
id: newId,
|
||||||
fallbackTitle: newTitle.trim(),
|
fallbackTitle: searchTitle || newTitle.trim(),
|
||||||
fallbackYear: videoYearRef.current,
|
fallbackYear:
|
||||||
|
videoYearRef.current === 'unknown' ? '' : videoYearRef.current,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 尝试跳转到当前正在播放的集数
|
// 尝试跳转到当前正在播放的集数
|
||||||
@@ -743,9 +744,11 @@ function PlayPageClient() {
|
|||||||
const newUrl = new URL(window.location.href);
|
const newUrl = new URL(window.location.href);
|
||||||
newUrl.searchParams.set('source', newSource);
|
newUrl.searchParams.set('source', newSource);
|
||||||
newUrl.searchParams.set('id', newId);
|
newUrl.searchParams.set('id', newId);
|
||||||
|
newUrl.searchParams.set('year', newDetail.year || 'unknown');
|
||||||
window.history.replaceState({}, '', newUrl.toString());
|
window.history.replaceState({}, '', newUrl.toString());
|
||||||
|
|
||||||
setVideoTitle(newDetail.title || newTitle);
|
setVideoTitle(newDetail.title || newTitle);
|
||||||
|
setVideoYear(newDetail.year || 'unknown');
|
||||||
setVideoCover(newDetail.poster);
|
setVideoCover(newDetail.poster);
|
||||||
setCurrentSource(newSource);
|
setCurrentSource(newSource);
|
||||||
setCurrentId(newId);
|
setCurrentId(newId);
|
||||||
|
|||||||
Reference in New Issue
Block a user