Stremio / stremio-addon-sdk

🧙 A Node.js SDK for creating and publishing Stremio add-ons
https://www.stremio.com/addon-sdk
MIT License
605 stars 158 forks source link

Feature-Request: add possibility to implement a UI for addon #275

Closed fatshotty closed 2 months ago

fatshotty commented 2 months ago

Hi, I would like to implement an EPG viewer UI such as channels list and timeline. Is it possible? can addon have a UI to show to user?

thanks

jaruba commented 2 months ago

No, but you could implement it in stremio-web (and maybe stremio-core) as a meta.behaviorHints perhaps, or maybe for the tv meta type

fatshotty commented 2 months ago

thanks @jaruba unfortunately I don't understand what u mean. Could you please explain what u mean with stremio-core and stremio-web ? Thanks

jaruba commented 2 months ago

the new Stremio apps are type agnostic, which means that the meta.type value should not influence the UI, in order to influence the UI from an addon's response, the behaviorHints should be used

for EPG, i would imagine that the metadata response from the addon would include something like:

meta.behaviorHints.epg = [
  {
    name: "Good Movie",
    logo: "https://example.com/good_movie.png",
    startTime: "Fri Apr 19 2024 11:00:00 GMT+0300",
    endTime: "Fri Apr 19 2024 11:00:00 GMT+0300"
  }
]

and the Stremio apps, if they support such a behavior hint, would translate this into UI elements on the metadata page of the app

Stremio Web is such a Stremio app that would require support for this behavior hint

Stremio Core is what handles the addon responses and sends them to the Stremio UI logic, i believe it does not have limitations when it comes to behaviorHints in particular, but I could be wrong

you would need to figure out how to implement it yourself though, i doubt i can be of more help than this