mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-01-11 20:10:25 +00:00
fixed type errors and syntax errors from merged PR.
This commit is contained in:
parent
916eeaef4c
commit
154d034e8f
6 changed files with 43 additions and 43 deletions
|
|
@ -678,8 +678,8 @@ const AppleTVHero: React.FC<AppleTVHeroProps> = ({
|
|||
banner: currentItem.banner,
|
||||
releaseInfo: currentItem.releaseInfo,
|
||||
genres: currentItem.genres
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// Add resume data if we have progress that's not near completion
|
||||
if (shouldResume && watchProgress) {
|
||||
|
|
|
|||
|
|
@ -997,14 +997,14 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
|||
navigation.navigate('Streams', {
|
||||
id: item.id,
|
||||
type: item.type,
|
||||
episodeId: episodeId
|
||||
episodeId: episodeId,
|
||||
addonId: item.addonId
|
||||
});
|
||||
} else {
|
||||
// For movies or series without specific episode, navigate to main content
|
||||
navigation.navigate('Streams', {
|
||||
id: item.id,
|
||||
type: item.type
|
||||
type: item.type,
|
||||
addonId: item.addonId
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,37 +196,37 @@ export const ThisWeekSection = React.memo(() => {
|
|||
}, [calendarData]);
|
||||
|
||||
const handleEpisodePress = (episode: ThisWeekEpisode) => {
|
||||
// For grouped episodes, always go to series details
|
||||
if (episode.isGroup) {
|
||||
navigation.navigate('Metadata', {
|
||||
id: episode.seriesId,
|
||||
type: 'series',
|
||||
addonId: episode.addonId,
|
||||
});
|
||||
return;
|
||||
}
|
||||
// For grouped episodes, always go to series details
|
||||
if (episode.isGroup) {
|
||||
navigation.navigate('Metadata', {
|
||||
id: episode.seriesId,
|
||||
type: 'series',
|
||||
addonId: episode.addonId,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// For upcoming episodes, go to the metadata screen
|
||||
if (!episode.isReleased) {
|
||||
// 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('Metadata', {
|
||||
navigation.navigate('Streams', {
|
||||
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 = () => {
|
||||
navigation.navigate('Calendar' as any);
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ export const useCalendarData = (): UseCalendarDataReturn => {
|
|||
overview: tmdbEpisode.overview || '',
|
||||
vote_average: tmdbEpisode.vote_average || 0,
|
||||
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,
|
||||
};
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ export const useCalendarData = (): UseCalendarDataReturn => {
|
|||
overview: '',
|
||||
vote_average: 0,
|
||||
still_path: null,
|
||||
season_poster_path: null
|
||||
season_poster_path: null,
|
||||
addonId: series.addonId,
|
||||
}
|
||||
};
|
||||
|
|
@ -267,7 +267,7 @@ export const useCalendarData = (): UseCalendarDataReturn => {
|
|||
overview: '',
|
||||
vote_average: 0,
|
||||
still_path: null,
|
||||
season_poster_path: null
|
||||
season_poster_path: null,
|
||||
addonId: series.addonId,
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ export type RootStackParamList = {
|
|||
};
|
||||
resumeTime?: number;
|
||||
duration?: number;
|
||||
addonId?: string;
|
||||
};
|
||||
PlayerIOS: {
|
||||
uri: string;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ export interface StreamingContent {
|
|||
imdb_id?: string;
|
||||
slug?: string;
|
||||
releaseInfo?: string;
|
||||
addonId?: string;
|
||||
traktSource?: 'watchlist' | 'continue-watching' | 'watched';
|
||||
addonCast?: Array<{
|
||||
id: number;
|
||||
|
|
@ -376,7 +375,7 @@ class CatalogService {
|
|||
if (metas && metas.length > 0) {
|
||||
// Cap items per catalog to reduce memory and rendering load
|
||||
const limited = metas.slice(0, 12);
|
||||
const items = limited.map(meta => this.convertMetaToStreamingContent(meta));
|
||||
const items = limited.map(meta => this.convertMetaToStreamingContent(meta, addon.id));
|
||||
|
||||
// Get potentially custom display name; if customized, respect it as-is
|
||||
const originalName = catalog.name || catalog.id;
|
||||
|
|
@ -468,7 +467,7 @@ class CatalogService {
|
|||
const metas = await stremioService.getCatalog(manifest, type, catalog.id, 1, filters);
|
||||
|
||||
if (metas && metas.length > 0) {
|
||||
const items = metas.map(meta => this.convertMetaToStreamingContent(meta));
|
||||
const items = metas.map(meta => this.convertMetaToStreamingContent(meta, addon.id));
|
||||
|
||||
// Get potentially custom display name
|
||||
const displayName = await getCatalogDisplayName(addon.id, catalog.type, catalog.id, catalog.name);
|
||||
|
|
@ -705,7 +704,7 @@ class CatalogService {
|
|||
});
|
||||
|
||||
// Add to recent content using enhanced conversion for full metadata
|
||||
const content = this.convertMetaToStreamingContentEnhanced(meta);
|
||||
const content = this.convertMetaToStreamingContentEnhanced(meta, preferredAddonId);
|
||||
this.addToRecentContent(content);
|
||||
|
||||
// Check if it's in the library
|
||||
|
|
@ -799,7 +798,7 @@ class CatalogService {
|
|||
|
||||
if (meta) {
|
||||
// Use basic conversion without enhanced metadata processing
|
||||
const content = this.convertMetaToStreamingContent(meta);
|
||||
const content = this.convertMetaToStreamingContent(meta, preferredAddonId);
|
||||
|
||||
// Check if it's in the library
|
||||
content.inLibrary = this.library[`${type}:${id}`] !== undefined;
|
||||
|
|
@ -818,7 +817,7 @@ class CatalogService {
|
|||
}
|
||||
}
|
||||
|
||||
private convertMetaToStreamingContent(meta: Meta): StreamingContent {
|
||||
private convertMetaToStreamingContent(meta: Meta, addonId?: string): StreamingContent {
|
||||
// Basic conversion for catalog display - no enhanced metadata processing
|
||||
// Use addon's poster if available, otherwise use placeholder
|
||||
let posterUrl = meta.poster;
|
||||
|
|
@ -853,7 +852,7 @@ class CatalogService {
|
|||
}
|
||||
|
||||
// Enhanced conversion for detailed metadata (used only when fetching individual content details)
|
||||
private convertMetaToStreamingContentEnhanced(meta: Meta): StreamingContent {
|
||||
private convertMetaToStreamingContentEnhanced(meta: Meta, addonId?: string): StreamingContent {
|
||||
// Enhanced conversion to utilize all available metadata from addons
|
||||
const converted: StreamingContent = {
|
||||
id: meta.id,
|
||||
|
|
@ -1239,10 +1238,10 @@ class CatalogService {
|
|||
const metas = await stremioService.getCatalog(manifest, type, catalogId, page, filters);
|
||||
|
||||
if (metas && metas.length > 0) {
|
||||
return metas.map(meta => ({
|
||||
...this.convertMetaToStreamingContent(meta),
|
||||
addonId: addonId
|
||||
}));
|
||||
return metas.map(meta => ({
|
||||
...this.convertMetaToStreamingContent(meta),
|
||||
addonId: addonId
|
||||
}));
|
||||
}
|
||||
return [];
|
||||
} catch (error) {
|
||||
|
|
@ -1537,7 +1536,7 @@ class CatalogService {
|
|||
if (metas.length > 0) {
|
||||
const items = metas.map(meta => ({
|
||||
...this.convertMetaToStreamingContent(meta),
|
||||
addonId: addon.id
|
||||
addonId: addon.id
|
||||
}));
|
||||
logger.log(`Found ${items.length} results from ${addon.name}`);
|
||||
return items;
|
||||
|
|
|
|||
Loading…
Reference in a new issue