mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-16 15:01:59 +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,
|
season: nextEpisodeVideo.season,
|
||||||
episode: nextEpisodeVideo.episode,
|
episode: nextEpisodeVideo.episode,
|
||||||
episodeTitle: `Episode ${nextEpisodeVideo.episode}`,
|
episodeTitle: `Episode ${nextEpisodeVideo.episode}`,
|
||||||
|
addonId: progress.addonId,
|
||||||
} as ContinueWatchingItem);
|
} as ContinueWatchingItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -582,6 +583,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
||||||
season: nextEpisodeVideo.season,
|
season: nextEpisodeVideo.season,
|
||||||
episode: nextEpisodeVideo.episode,
|
episode: nextEpisodeVideo.episode,
|
||||||
episodeTitle: `Episode ${nextEpisodeVideo.episode}`,
|
episodeTitle: `Episode ${nextEpisodeVideo.episode}`,
|
||||||
|
addonId: progress.addonId,
|
||||||
} as ContinueWatchingItem);
|
} as ContinueWatchingItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -595,6 +597,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
||||||
season,
|
season,
|
||||||
episode: episodeNumber,
|
episode: episodeNumber,
|
||||||
episodeTitle,
|
episodeTitle,
|
||||||
|
addonId: progress.addonId,
|
||||||
} as ContinueWatchingItem);
|
} as ContinueWatchingItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -667,6 +670,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
||||||
type: 'movie',
|
type: 'movie',
|
||||||
progress: item.progress,
|
progress: item.progress,
|
||||||
lastUpdated: pausedAt,
|
lastUpdated: pausedAt,
|
||||||
|
addonId: progress.addonId,
|
||||||
} as ContinueWatchingItem);
|
} as ContinueWatchingItem);
|
||||||
|
|
||||||
logger.log(`📺 [TraktPlayback] Adding movie ${item.movie.title} with ${item.progress.toFixed(1)}% progress`);
|
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,
|
season: item.episode.season,
|
||||||
episode: item.episode.number,
|
episode: item.episode.number,
|
||||||
episodeTitle: item.episode.title || `Episode ${item.episode.number}`,
|
episodeTitle: item.episode.title || `Episode ${item.episode.number}`,
|
||||||
|
addonId: progress.addonId,
|
||||||
} as ContinueWatchingItem);
|
} as ContinueWatchingItem);
|
||||||
|
|
||||||
processedShows.add(showImdb);
|
processedShows.add(showImdb);
|
||||||
|
|
@ -768,6 +773,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
||||||
season: nextEpisodeVideo.season,
|
season: nextEpisodeVideo.season,
|
||||||
episode: nextEpisodeVideo.episode,
|
episode: nextEpisodeVideo.episode,
|
||||||
episodeTitle: `Episode ${nextEpisodeVideo.episode}`,
|
episodeTitle: `Episode ${nextEpisodeVideo.episode}`,
|
||||||
|
addonId: progress.addonId,
|
||||||
} as ContinueWatchingItem);
|
} as ContinueWatchingItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,8 @@ const AndroidVideoPlayer: React.FC = () => {
|
||||||
playerState.duration,
|
playerState.duration,
|
||||||
playerState.paused,
|
playerState.paused,
|
||||||
traktAutosync,
|
traktAutosync,
|
||||||
controlsHook.seekToTime
|
controlsHook.seekToTime,
|
||||||
|
currentStreamProvider
|
||||||
);
|
);
|
||||||
|
|
||||||
const gestureControls = usePlayerGestureControls({
|
const gestureControls = usePlayerGestureControls({
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@ export const useWatchProgress = (
|
||||||
duration: number,
|
duration: number,
|
||||||
paused: boolean,
|
paused: boolean,
|
||||||
traktAutosync: any,
|
traktAutosync: any,
|
||||||
seekToTime: (time: number) => void
|
seekToTime: (time: number) => void,
|
||||||
|
addonId?: string
|
||||||
) => {
|
) => {
|
||||||
const [resumePosition, setResumePosition] = useState<number | null>(null);
|
const [resumePosition, setResumePosition] = useState<number | null>(null);
|
||||||
const [savedDuration, setSavedDuration] = useState<number | null>(null);
|
const [savedDuration, setSavedDuration] = useState<number | null>(null);
|
||||||
|
|
@ -74,7 +75,8 @@ export const useWatchProgress = (
|
||||||
const progress = {
|
const progress = {
|
||||||
currentTime: currentTimeRef.current,
|
currentTime: currentTimeRef.current,
|
||||||
duration: durationRef.current,
|
duration: durationRef.current,
|
||||||
lastUpdated: Date.now()
|
lastUpdated: Date.now(),
|
||||||
|
addonId: addonId
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
await storageService.setWatchProgress(id, type, progress, episodeId);
|
await storageService.setWatchProgress(id, type, progress, episodeId);
|
||||||
|
|
|
||||||
|
|
@ -220,7 +220,7 @@ export const useCalendarData = (): UseCalendarDataReturn => {
|
||||||
vote_average: tmdbEpisode.vote_average || 0,
|
vote_average: tmdbEpisode.vote_average || 0,
|
||||||
still_path: tmdbEpisode.still_path || null,
|
still_path: tmdbEpisode.still_path || null,
|
||||||
season_poster_path: tmdbEpisode.season_poster_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,
|
vote_average: 0,
|
||||||
still_path: null,
|
still_path: null,
|
||||||
season_poster_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,
|
vote_average: 0,
|
||||||
still_path: null,
|
still_path: null,
|
||||||
season_poster_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,
|
episodeId: (type === 'series' || type === 'other') && selectedEpisode ? selectedEpisode : undefined,
|
||||||
imdbId: imdbId || undefined,
|
imdbId: imdbId || undefined,
|
||||||
availableStreams: streamsToPass,
|
availableStreams: streamsToPass,
|
||||||
backdrop: bannerImage,
|
backdrop: bannerImage || metadata?.banner,
|
||||||
videoType,
|
videoType,
|
||||||
} as any);
|
} as any);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue