mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-20 04:47:30 +08:00
fix: try to fix year
This commit is contained in:
@@ -513,6 +513,7 @@ function PlayPageClient() {
|
|||||||
|
|
||||||
// 更新状态保存详情
|
// 更新状态保存详情
|
||||||
setVideoTitle(detailData.title || videoTitleRef.current);
|
setVideoTitle(detailData.title || videoTitleRef.current);
|
||||||
|
setVideoYear(detailData.year);
|
||||||
setVideoCover(detailData.poster);
|
setVideoCover(detailData.poster);
|
||||||
setDetail(detailData);
|
setDetail(detailData);
|
||||||
|
|
||||||
@@ -930,6 +931,7 @@ function PlayPageClient() {
|
|||||||
console.log('播放进度已保存:', {
|
console.log('播放进度已保存:', {
|
||||||
title: videoTitleRef.current,
|
title: videoTitleRef.current,
|
||||||
episode: currentEpisodeIndexRef.current + 1,
|
episode: currentEpisodeIndexRef.current + 1,
|
||||||
|
year: detailRef.current?.year || 'unknown',
|
||||||
progress: `${Math.floor(currentTime)}/${Math.floor(duration)}`,
|
progress: `${Math.floor(currentTime)}/${Math.floor(duration)}`,
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -96,8 +96,9 @@ export default function VideoCard({
|
|||||||
aggregateData?.mostFrequentDoubanId ?? douban_id
|
aggregateData?.mostFrequentDoubanId ?? douban_id
|
||||||
);
|
);
|
||||||
const actualEpisodes = aggregateData?.mostFrequentEpisodes ?? episodes;
|
const actualEpisodes = aggregateData?.mostFrequentEpisodes ?? episodes;
|
||||||
const actualYear =
|
const actualYear = isAggregate
|
||||||
(isAggregate ? aggregateData?.first.year : year) || 'unknown';
|
? aggregateData?.first.year || 'unknown'
|
||||||
|
: year;
|
||||||
const actualQuery = query || '';
|
const actualQuery = query || '';
|
||||||
const actualSearchType = isAggregate
|
const actualSearchType = isAggregate
|
||||||
? aggregateData?.first.episodes.length === 1
|
? aggregateData?.first.episodes.length === 1
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export class DbManager {
|
|||||||
userName: string,
|
userName: string,
|
||||||
source: string,
|
source: string,
|
||||||
id: string,
|
id: string,
|
||||||
record: Omit<PlayRecord, 'user_id'>
|
record: PlayRecord
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const key = generateStorageKey(source, id);
|
const key = generateStorageKey(source, id);
|
||||||
await this.storage.setPlayRecord(userName, key, record);
|
await this.storage.setPlayRecord(userName, key, record);
|
||||||
@@ -129,7 +129,7 @@ export class DbManager {
|
|||||||
userName: string,
|
userName: string,
|
||||||
source: string,
|
source: string,
|
||||||
id: string,
|
id: string,
|
||||||
favoriteData?: Omit<Favorite, 'user_id'>
|
favoriteData?: Favorite
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const isFav = await this.isFavorited(userName, source, id);
|
const isFav = await this.isFavorited(userName, source, id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user