mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
Merge pull request #327 from chrisk325/main
this should fix addon provided metadata for "continue watching" and "trakt this week"
This commit is contained in:
commit
9bb9d6548a
5 changed files with 16 additions and 7 deletions
|
|
@ -504,6 +504,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
|||
season: nextEpisodeVideo.season,
|
||||
episode: nextEpisodeVideo.episode,
|
||||
episodeTitle: `Episode ${nextEpisodeVideo.episode}`,
|
||||
addonId: progress.addonId,
|
||||
} as ContinueWatchingItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -582,6 +583,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
|||
season: nextEpisodeVideo.season,
|
||||
episode: nextEpisodeVideo.episode,
|
||||
episodeTitle: `Episode ${nextEpisodeVideo.episode}`,
|
||||
addonId: progress.addonId,
|
||||
} as ContinueWatchingItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -595,6 +597,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
|||
season,
|
||||
episode: episodeNumber,
|
||||
episodeTitle,
|
||||
addonId: progress.addonId,
|
||||
} as ContinueWatchingItem);
|
||||
}
|
||||
|
||||
|
|
@ -667,6 +670,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
|||
type: 'movie',
|
||||
progress: item.progress,
|
||||
lastUpdated: pausedAt,
|
||||
addonId: progress.addonId,
|
||||
} as ContinueWatchingItem);
|
||||
|
||||
logger.log(`📺 [TraktPlayback] Adding movie ${item.movie.title} with ${item.progress.toFixed(1)}% progress`);
|
||||
|
|
@ -700,6 +704,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
|||
season: item.episode.season,
|
||||
episode: item.episode.number,
|
||||
episodeTitle: item.episode.title || `Episode ${item.episode.number}`,
|
||||
addonId: progress.addonId,
|
||||
} as ContinueWatchingItem);
|
||||
|
||||
processedShows.add(showImdb);
|
||||
|
|
@ -768,6 +773,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
|||
season: nextEpisodeVideo.season,
|
||||
episode: nextEpisodeVideo.episode,
|
||||
episodeTitle: `Episode ${nextEpisodeVideo.episode}`,
|
||||
addonId: progress.addonId,
|
||||
} as ContinueWatchingItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,7 +207,8 @@ const AndroidVideoPlayer: React.FC = () => {
|
|||
playerState.duration,
|
||||
playerState.paused,
|
||||
traktAutosync,
|
||||
controlsHook.seekToTime
|
||||
controlsHook.seekToTime,
|
||||
currentStreamProvider
|
||||
);
|
||||
|
||||
const gestureControls = usePlayerGestureControls({
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ export const useWatchProgress = (
|
|||
duration: number,
|
||||
paused: boolean,
|
||||
traktAutosync: any,
|
||||
seekToTime: (time: number) => void
|
||||
seekToTime: (time: number) => void,
|
||||
addonId?: string
|
||||
) => {
|
||||
const [resumePosition, setResumePosition] = useState<number | null>(null);
|
||||
const [savedDuration, setSavedDuration] = useState<number | null>(null);
|
||||
|
|
@ -74,7 +75,8 @@ export const useWatchProgress = (
|
|||
const progress = {
|
||||
currentTime: currentTimeRef.current,
|
||||
duration: durationRef.current,
|
||||
lastUpdated: Date.now()
|
||||
lastUpdated: Date.now(),
|
||||
addonId: addonId
|
||||
};
|
||||
try {
|
||||
await storageService.setWatchProgress(id, type, progress, episodeId);
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ export const useCalendarData = (): UseCalendarDataReturn => {
|
|||
vote_average: tmdbEpisode.vote_average || 0,
|
||||
still_path: tmdbEpisode.still_path || null,
|
||||
season_poster_path: tmdbEpisode.season_poster_path || null,
|
||||
addonId: series.addonId,
|
||||
addonId: episodeData.addonId || series.addonId,
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ export const useCalendarData = (): UseCalendarDataReturn => {
|
|||
vote_average: 0,
|
||||
still_path: null,
|
||||
season_poster_path: null,
|
||||
addonId: series.addonId,
|
||||
addonId: episodeData?.addonId || series.addonId,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -268,7 +268,7 @@ export const useCalendarData = (): UseCalendarDataReturn => {
|
|||
vote_average: 0,
|
||||
still_path: null,
|
||||
season_poster_path: null,
|
||||
addonId: series.addonId,
|
||||
addonId: episodeData?.addonId || series.addonId,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ export const useStreamsScreen = () => {
|
|||
episodeId: (type === 'series' || type === 'other') && selectedEpisode ? selectedEpisode : undefined,
|
||||
imdbId: imdbId || undefined,
|
||||
availableStreams: streamsToPass,
|
||||
backdrop: bannerImage,
|
||||
backdrop: bannerImage || metadata?.banner,
|
||||
videoType,
|
||||
} as any);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue