mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-27 11:23:02 +00:00
Merge pull request #321 from chrisk325/main
This commit is contained in:
commit
ad18e30de7
9 changed files with 62 additions and 37 deletions
|
|
@ -672,13 +672,14 @@ const AppleTVHero: React.FC<AppleTVHeroProps> = ({
|
||||||
id: currentItem.id,
|
id: currentItem.id,
|
||||||
type: currentItem.type,
|
type: currentItem.type,
|
||||||
title: currentItem.name,
|
title: currentItem.name,
|
||||||
|
addonId: currentItem.addonId,
|
||||||
metadata: {
|
metadata: {
|
||||||
poster: currentItem.poster,
|
poster: currentItem.poster,
|
||||||
banner: currentItem.banner,
|
banner: currentItem.banner,
|
||||||
releaseInfo: currentItem.releaseInfo,
|
releaseInfo: currentItem.releaseInfo,
|
||||||
genres: currentItem.genres
|
genres: currentItem.genres
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add resume data if we have progress that's not near completion
|
// Add resume data if we have progress that's not near completion
|
||||||
if (shouldResume && watchProgress) {
|
if (shouldResume && watchProgress) {
|
||||||
|
|
@ -697,6 +698,7 @@ const AppleTVHero: React.FC<AppleTVHeroProps> = ({
|
||||||
id: currentItem.id,
|
id: currentItem.id,
|
||||||
type: currentItem.type,
|
type: currentItem.type,
|
||||||
title: currentItem.name,
|
title: currentItem.name,
|
||||||
|
addonId: currentItem.addonId,
|
||||||
metadata: {
|
metadata: {
|
||||||
poster: currentItem.poster,
|
poster: currentItem.poster,
|
||||||
banner: currentItem.banner,
|
banner: currentItem.banner,
|
||||||
|
|
@ -1184,6 +1186,7 @@ const AppleTVHero: React.FC<AppleTVHeroProps> = ({
|
||||||
navigation.navigate('Metadata', {
|
navigation.navigate('Metadata', {
|
||||||
id: currentItem.id,
|
id: currentItem.id,
|
||||||
type: currentItem.type,
|
type: currentItem.type,
|
||||||
|
addonId: currentItem.addonId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
@ -1220,6 +1223,7 @@ const AppleTVHero: React.FC<AppleTVHeroProps> = ({
|
||||||
navigation.navigate('Metadata', {
|
navigation.navigate('Metadata', {
|
||||||
id: currentItem.id,
|
id: currentItem.id,
|
||||||
type: currentItem.type,
|
type: currentItem.type,
|
||||||
|
addonId: currentItem.addonId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ interface ContinueWatchingItem extends StreamingContent {
|
||||||
season?: number;
|
season?: number;
|
||||||
episode?: number;
|
episode?: number;
|
||||||
episodeTitle?: string;
|
episodeTitle?: string;
|
||||||
|
addonId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define the ref interface
|
// Define the ref interface
|
||||||
|
|
@ -997,12 +998,14 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
||||||
id: item.id,
|
id: item.id,
|
||||||
type: item.type,
|
type: item.type,
|
||||||
episodeId: episodeId
|
episodeId: episodeId
|
||||||
|
addonId: item.addonId
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// For movies or series without specific episode, navigate to main content
|
// For movies or series without specific episode, navigate to main content
|
||||||
navigation.navigate('Streams', {
|
navigation.navigate('Streams', {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
type: item.type
|
type: item.type
|
||||||
|
addonId: item.addonId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -228,9 +228,9 @@ const HeroCarousel: React.FC<HeroCarouselProps> = ({ items, loading = false }) =
|
||||||
|
|
||||||
const contentPadding = useMemo(() => ({ paddingHorizontal: (windowWidth - cardWidth) / 2 }), [windowWidth, cardWidth]);
|
const contentPadding = useMemo(() => ({ paddingHorizontal: (windowWidth - cardWidth) / 2 }), [windowWidth, cardWidth]);
|
||||||
|
|
||||||
const handleNavigateToMetadata = useCallback((id: string, type: any) => {
|
const handleNavigateToMetadata = useCallback((id: string, type: any, addonId?: string) => {
|
||||||
navigation.navigate('Metadata', { id, type });
|
navigation.navigate('Metadata', { id, type, addonId });
|
||||||
}, [navigation]);
|
}, [navigation]);
|
||||||
|
|
||||||
// Container animation based on scroll - must be before early returns
|
// Container animation based on scroll - must be before early returns
|
||||||
// TEMPORARILY DISABLED FOR PERFORMANCE TESTING
|
// TEMPORARILY DISABLED FOR PERFORMANCE TESTING
|
||||||
|
|
@ -399,7 +399,7 @@ const HeroCarousel: React.FC<HeroCarouselProps> = ({ items, loading = false }) =
|
||||||
colors={currentTheme.colors}
|
colors={currentTheme.colors}
|
||||||
logoFailed={failedLogoIds.has(item.id)}
|
logoFailed={failedLogoIds.has(item.id)}
|
||||||
onLogoError={() => setFailedLogoIds((prev) => new Set(prev).add(item.id))}
|
onLogoError={() => setFailedLogoIds((prev) => new Set(prev).add(item.id))}
|
||||||
onPressInfo={() => handleNavigateToMetadata(item.id, item.type)}
|
onPressInfo={() => handleNavigateToMetadata(item.id, item.type, item.addonId)}
|
||||||
scrollX={scrollX}
|
scrollX={scrollX}
|
||||||
index={index}
|
index={index}
|
||||||
flipped={!!flippedMap[item.id]}
|
flipped={!!flippedMap[item.id]}
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ interface ThisWeekEpisode {
|
||||||
vote_average: number;
|
vote_average: number;
|
||||||
still_path: string | null;
|
still_path: string | null;
|
||||||
season_poster_path: string | null;
|
season_poster_path: string | null;
|
||||||
|
addonId?: string;
|
||||||
// Grouping fields
|
// Grouping fields
|
||||||
isGroup?: boolean;
|
isGroup?: boolean;
|
||||||
episodeCount?: number;
|
episodeCount?: number;
|
||||||
|
|
@ -195,34 +196,37 @@ export const ThisWeekSection = React.memo(() => {
|
||||||
}, [calendarData]);
|
}, [calendarData]);
|
||||||
|
|
||||||
const handleEpisodePress = (episode: ThisWeekEpisode) => {
|
const handleEpisodePress = (episode: ThisWeekEpisode) => {
|
||||||
// For grouped episodes, always go to series details
|
// For grouped episodes, always go to series details
|
||||||
if (episode.isGroup) {
|
if (episode.isGroup) {
|
||||||
navigation.navigate('Metadata', {
|
navigation.navigate('Metadata', {
|
||||||
id: episode.seriesId,
|
|
||||||
type: 'series'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For upcoming episodes, go to the metadata screen
|
|
||||||
if (!episode.isReleased) {
|
|
||||||
const episodeId = `${episode.seriesId}:${episode.season}:${episode.episode}`;
|
|
||||||
navigation.navigate('Metadata', {
|
|
||||||
id: episode.seriesId,
|
|
||||||
type: 'series',
|
|
||||||
episodeId
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For released episodes, go to the streams screen
|
|
||||||
const episodeId = `${episode.seriesId}:${episode.season}:${episode.episode}`;
|
|
||||||
navigation.navigate('Streams', {
|
|
||||||
id: episode.seriesId,
|
id: episode.seriesId,
|
||||||
type: 'series',
|
type: 'series',
|
||||||
episodeId
|
addonId: episode.addonId,
|
||||||
});
|
});
|
||||||
};
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// For upcoming episodes, go to the metadata screen
|
||||||
|
if (!episode.isReleased) {
|
||||||
|
const episodeId = `${episode.seriesId}:${episode.season}:${episode.episode}`;
|
||||||
|
navigation.navigate('Metadata', {
|
||||||
|
id: episode.seriesId,
|
||||||
|
type: 'series',
|
||||||
|
episodeId,
|
||||||
|
addonId: episode.addonId,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// For released episodes, go to the streams screen
|
||||||
|
const episodeId = `${episode.seriesId}:${episode.season}:${episode.episode}`;
|
||||||
|
navigation.navigate('Streams', {
|
||||||
|
id: episode.seriesId,
|
||||||
|
type: 'series',
|
||||||
|
episodeId,
|
||||||
|
addonId: episode.addonId,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const handleViewAll = () => {
|
const handleViewAll = () => {
|
||||||
navigation.navigate('Calendar' as any);
|
navigation.navigate('Calendar' as any);
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ interface CalendarEpisode {
|
||||||
vote_average: number;
|
vote_average: number;
|
||||||
still_path: string | null;
|
still_path: string | null;
|
||||||
season_poster_path: string | null;
|
season_poster_path: string | null;
|
||||||
|
addonId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface CalendarSection {
|
interface CalendarSection {
|
||||||
|
|
@ -219,6 +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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -245,6 +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,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -265,6 +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,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ export function useFeaturedContent() {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
type: item.type,
|
type: item.type,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
|
addonId: item.addonId,
|
||||||
poster: item.poster,
|
poster: item.poster,
|
||||||
banner: (item as any).banner,
|
banner: (item as any).banner,
|
||||||
logo: (item as any).logo,
|
logo: (item as any).logo,
|
||||||
|
|
|
||||||
|
|
@ -909,8 +909,13 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat
|
||||||
|
|
||||||
// Centralized logo fetching logic
|
// Centralized logo fetching logic
|
||||||
try {
|
try {
|
||||||
|
if (addonLogo) {
|
||||||
|
finalMetadata.logo = addonLogo;
|
||||||
|
if (__DEV__) {
|
||||||
|
console.log('[useMetadata] Using addon-provided logo:', { hasLogo: true });
|
||||||
|
}
|
||||||
// Check both master switch AND granular logos setting
|
// Check both master switch AND granular logos setting
|
||||||
if (settings.enrichMetadataWithTMDB && settings.tmdbEnrichLogos) {
|
} else if (settings.enrichMetadataWithTMDB && settings.tmdbEnrichLogos) {
|
||||||
// Only use TMDB logos when both enrichment AND logos option are ON
|
// Only use TMDB logos when both enrichment AND logos option are ON
|
||||||
const tmdbService = TMDBService.getInstance();
|
const tmdbService = TMDBService.getInstance();
|
||||||
const preferredLanguage = settings.tmdbLanguagePreference || 'en';
|
const preferredLanguage = settings.tmdbLanguagePreference || 'en';
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ export interface StreamingContent {
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
addonId?: string;
|
||||||
tmdbId?: number;
|
tmdbId?: number;
|
||||||
poster: string;
|
poster: string;
|
||||||
posterShape?: 'poster' | 'square' | 'landscape';
|
posterShape?: 'poster' | 'square' | 'landscape';
|
||||||
|
|
@ -835,6 +836,7 @@ class CatalogService {
|
||||||
id: meta.id,
|
id: meta.id,
|
||||||
type: meta.type,
|
type: meta.type,
|
||||||
name: meta.name,
|
name: meta.name,
|
||||||
|
addonId,
|
||||||
poster: posterUrl,
|
poster: posterUrl,
|
||||||
posterShape: meta.posterShape || 'poster', // Use addon's shape or default to poster type
|
posterShape: meta.posterShape || 'poster', // Use addon's shape or default to poster type
|
||||||
banner: meta.background,
|
banner: meta.background,
|
||||||
|
|
@ -857,6 +859,7 @@ class CatalogService {
|
||||||
id: meta.id,
|
id: meta.id,
|
||||||
type: meta.type,
|
type: meta.type,
|
||||||
name: meta.name,
|
name: meta.name,
|
||||||
|
addonId,
|
||||||
poster: meta.poster || 'https://via.placeholder.com/300x450/cccccc/666666?text=No+Image',
|
poster: meta.poster || 'https://via.placeholder.com/300x450/cccccc/666666?text=No+Image',
|
||||||
posterShape: meta.posterShape || 'poster',
|
posterShape: meta.posterShape || 'poster',
|
||||||
banner: meta.background,
|
banner: meta.background,
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ interface WatchProgress {
|
||||||
currentTime: number;
|
currentTime: number;
|
||||||
duration: number;
|
duration: number;
|
||||||
lastUpdated: number;
|
lastUpdated: number;
|
||||||
|
addonId?: string;
|
||||||
traktSynced?: boolean;
|
traktSynced?: boolean;
|
||||||
traktLastSynced?: number;
|
traktLastSynced?: number;
|
||||||
traktProgress?: number;
|
traktProgress?: number;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue