mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-25 10:33:07 +00:00
Merge branch 'main' of https://github.com/tapframe/NuvioStreaming
This commit is contained in:
commit
79213ad573
2 changed files with 19 additions and 5 deletions
|
|
@ -906,7 +906,11 @@ const SearchScreen = () => {
|
||||||
isGrid && styles.discoverGridItem
|
isGrid && styles.discoverGridItem
|
||||||
]}
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
navigation.navigate('Metadata', { id: item.id, type: item.type });
|
navigation.navigate('Metadata', {
|
||||||
|
id: item.id,
|
||||||
|
type: item.type,
|
||||||
|
addonId: item.addonId
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
onLongPress={() => {
|
onLongPress={() => {
|
||||||
setSelectedItem(item);
|
setSelectedItem(item);
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ export interface StreamingContent {
|
||||||
imdb_id?: string;
|
imdb_id?: string;
|
||||||
slug?: string;
|
slug?: string;
|
||||||
releaseInfo?: string;
|
releaseInfo?: string;
|
||||||
|
addonId?: string;
|
||||||
traktSource?: 'watchlist' | 'continue-watching' | 'watched';
|
traktSource?: 'watchlist' | 'continue-watching' | 'watched';
|
||||||
addonCast?: Array<{
|
addonCast?: Array<{
|
||||||
id: number;
|
id: number;
|
||||||
|
|
@ -1155,7 +1156,10 @@ class CatalogService {
|
||||||
const metas = await stremioService.getCatalog(manifest, type, catalog.id, 1, filters);
|
const metas = await stremioService.getCatalog(manifest, type, catalog.id, 1, filters);
|
||||||
|
|
||||||
if (metas && metas.length > 0) {
|
if (metas && metas.length > 0) {
|
||||||
const items = metas.slice(0, limit).map(meta => this.convertMetaToStreamingContent(meta));
|
const items = metas.slice(0, limit).map(meta => ({
|
||||||
|
...this.convertMetaToStreamingContent(meta),
|
||||||
|
addonId: addon.id // Attach addon ID to each result
|
||||||
|
}));
|
||||||
return {
|
return {
|
||||||
addonName: addon.name,
|
addonName: addon.name,
|
||||||
items
|
items
|
||||||
|
|
@ -1232,7 +1236,10 @@ class CatalogService {
|
||||||
const metas = await stremioService.getCatalog(manifest, type, catalogId, page, filters);
|
const metas = await stremioService.getCatalog(manifest, type, catalogId, page, filters);
|
||||||
|
|
||||||
if (metas && metas.length > 0) {
|
if (metas && metas.length > 0) {
|
||||||
return metas.map(meta => this.convertMetaToStreamingContent(meta));
|
return metas.map(meta => ({
|
||||||
|
...this.convertMetaToStreamingContent(meta),
|
||||||
|
addonId: addonId
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
@ -1525,7 +1532,10 @@ class CatalogService {
|
||||||
const metas = response.data?.metas || [];
|
const metas = response.data?.metas || [];
|
||||||
|
|
||||||
if (metas.length > 0) {
|
if (metas.length > 0) {
|
||||||
const items = metas.map(meta => this.convertMetaToStreamingContent(meta));
|
const items = metas.map(meta => ({
|
||||||
|
...this.convertMetaToStreamingContent(meta),
|
||||||
|
addonId: addon.id
|
||||||
|
}));
|
||||||
logger.log(`Found ${items.length} results from ${addon.name}`);
|
logger.log(`Found ${items.length} results from ${addon.name}`);
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue