Auto Config does not work
I am trying to create an addon with configuration.
Its described here how to: https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/api/responses/manifest.md#user-data
I do exactly that and my /configure url is empty. "Cannot GET /configure".
Here is my complete code
const { addonBuilder } = require("stremio-addon-sdk");
// Docs: https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/api/responses/manifest.md
const manifest = {
id: "community.medialib",
version: "0.0.1",
catalogs: [
{
type: "movie",
id: "bunnies",
name: "BUNNIES?",
},
{
type: "movie",
id: "batmans",
},
],
resources: ["catalog", "subtitles"],
types: ["movie", "series"],
name: "MediaLib",
description: "Get lists from medialib and scrobble",
behaviorHints: {
configurable: true,
configurationRequired: true,
},
config: [
{
key: "stremioSecret",
type: "text",
},
],
};
const builder = new addonBuilder(manifest);
builder.defineCatalogHandler(({ type, id, extra }) => {
console.log("request for catalogs: " + type + " " + id);
// Docs: https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/api/requests/defineCatalogHandler.md
if (id === "batmans")
return Promise.resolve({
metas: [
{
id: "tt0468569",
type: "movie",
name: "The Dark Knight",
poster: "https://image.tmdb.org/t/p/w600_and_h900_bestv2/qJ2tW6WMUDux911r6m7haRef0WH.jpg",
},
],
});
if (id === "bunnies")
return Promise.resolve({
metas: [
{
id: "tt1254207",
type: "movie",
name: "The Big Buck Bunny with edit",
poster: "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/220px-Big_buck_bunny_poster_big.jpg",
},
],
});
});
builder.defineSubtitlesHandler(({ type, id, extra }) => {
console.log("request for subtitles: " + type + " " + id);
// Docs: https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/api/requests/defineSubtitlesHandler.md
return Promise.resolve({ subtitles: [] });
});
module.exports = builder.getInterface();
As you can see im basically doing nothing yet. Im just trying to get the configuration to work.
I saw the way to do it with express or anything that can server http requests, but I want to use the sdk and keep things as simple as possible for now.
I found 2 other people with the same problem, one gave up and one just said node version. Not very helpful to me atm. I also dont get any of the warnings i saw in the code, when I have just a config without the behaviourHints...
@Maskoe check your package-lock.json and see which version on the stremio-addon-sdk u have installed