mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-18 07:12:18 +00:00
small fix
This commit is contained in:
parent
28d27128d1
commit
e0ad949141
1 changed files with 13 additions and 5 deletions
|
|
@ -227,18 +227,26 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
|||
try {
|
||||
const shouldFetchMeta = await stremioService.isValidContentId(type, id);
|
||||
|
||||
const [metadata, basicContent, addonContent] = await Promise.all([
|
||||
const [metadata, basicContent, addonSpecificMeta, metadataAddonMeta] = await Promise.all([
|
||||
shouldFetchMeta ? stremioService.getMetaDetails(type, id) : Promise.resolve(null),
|
||||
catalogService.getBasicContentDetails(type, id),
|
||||
addonId ? stremioService.getMetaDetails(type, id, addonId).catch(() => null) : Promise.resolve(null)
|
||||
|
||||
addonId
|
||||
? stremioService.getMetaDetails(type, id, addonId).catch(() => null)
|
||||
: Promise.resolve(null),
|
||||
|
||||
stremioService.getMetaDetails(type, id).catch(() => null)
|
||||
]);
|
||||
|
||||
const preferredAddonMeta = addonSpecificMeta || metadataAddonMeta;
|
||||
|
||||
const finalContent = basicContent ? {
|
||||
...basicContent,
|
||||
...(addonContent?.name && { name: addonContent.name }),
|
||||
...(addonContent?.poster && { poster: addonContent.poster }),
|
||||
...(addonContent?.description && { description: addonContent.description }),
|
||||
...(preferredAddonMeta?.name && { name: preferredAddonMeta.name }),
|
||||
...(preferredAddonMeta?.poster && { poster: preferredAddonMeta.poster }),
|
||||
...(preferredAddonMeta?.description && { description: preferredAddonMeta.description }),
|
||||
} : null;
|
||||
|
||||
|
||||
if (finalContent) {
|
||||
const result = { metadata, basicContent: finalContent, addonContent, timestamp: now };
|
||||
|
|
|
|||
Loading…
Reference in a new issue