stremio-addon-sdk icon indicating copy to clipboard operation
stremio-addon-sdk copied to clipboard

Android Stremio not calling Stream Handler and Meta Handler

Open imcurs opened this issue 1 year ago • 1 comments

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"
    }, 

imcurs avatar Oct 31 '24 00:10 imcurs

can you share an example catalog response from your addon?

dexter21767-dev avatar Feb 12 '25 04:02 dexter21767-dev