stremio-addon-sdk
stremio-addon-sdk copied to clipboard
Android Stremio not calling Stream Handler and Meta Handler
Hi, my add on works correctly in the web application, but when it comes to android it doesn't load the metas nor the streams in some movies. I do have the codes:
// Meta handler
builder.defineMetaHandler(function(args) {
const meta = dataMovie[args.id]; // Aquà args.id es el ID de la pelÃcula seleccionada
if (meta) {
console.log("Metadatos encontrados:", meta); // Para depuración
return Promise.resolve({ meta: meta });
} else {
console.error("Metadatos no encontrados para ID:", args.id); // Log de error
return Promise.resolve({ meta: null });
}
});
// Streams handler
builder.defineStreamHandler(function(args) {
if (dataset[args.id]) {
return Promise.resolve({ streams: [dataset[args.id]] });
} else {
return Promise.resolve({ streams: [] });
}
})
This is an example of the data, the streams I have in a separate file:
"tt13429870": {
"id": "tt13429870",
"name": "Mi Amigo Robot",
"type": "movie",
"categories": "primemovie",
"year": 2024,
"genres": ["Animation", "Drama", "Music"],
"description": "Narra las aventuras y desventuras de Perro y Robot en Nueva York durante los años 80.",
"background": "https://image.tmdb.org/t/p/original/hIeEpk2w1dnC9ly9ZJwwbunH2Cx.jpg",
"logo": "https://image.tmdb.org/t/p/original/mIMMK2hLerC266742jenpwteZ7A.png",
"imdbRating": 7.6,
"releaseInfo": 2023,
"runtime": "103 min"
},
can you share an example catalog response from your addon?