Stremio / stremio-addon-sdk

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

Displaying addon error messages? #256

Closed SageTendo closed 8 months ago

SageTendo commented 8 months ago

Does the SDK provide a way of displaying error responses or messages from an addon within Stremio?

jaruba commented 8 months ago

what app are u testing with? (on what platform) and can you explain the issues you're experiencing with it?

SageTendo commented 8 months ago

I'm currently developing an addon that will make use of MyAnimeList's (MAL) API. For convenience purposes, I'd like to display a message to the user when their MAL API key has expired within Stremio. I was wondering if there was a way of achieving something of that sort.

jaruba commented 8 months ago

There is no guaranteed way of showing a notification to the user across all platforms. I guess the closest thing that could be done is replying with a stream and externalUrl pointing to the addon config page. But the users may never see it if it's at the end of a big stream list..

jaruba commented 8 months ago

the MAL API refresh token can be renewed within 31 days though? so giving such a notification would be for an edge case where a user didn't use the addon for 31 days?

SageTendo commented 8 months ago

There is no guaranteed way of showing a notification to the user across all platforms. I guess the closest thing that could be done is replying with a stream and externalUrl pointing to the addon config page. But the users may never see it if it's at the end of a big stream list..

I guess I could look into that and see how effective it might be. Thank you.

SageTendo commented 8 months ago

the MAL API refresh token can be renewed within 31 days though? so giving such a notification would be for an edge case where a user didn't use the addon for 31 days?

That's a fair point, I guess I just got caught up in the "what ifs". I'll close this issue, thanks.