Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Stremio not calling Stream Handler and Meta Handler #306

Open
imcurs opened this issue Oct 31, 2024 · 0 comments
Open

Android Stremio not calling Stream Handler and Meta Handler #306

imcurs opened this issue Oct 31, 2024 · 0 comments

Comments

@imcurs
Copy link

imcurs commented Oct 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant