Addons: Add Update Addons functionality#1188
Addons: Add Update Addons functionality#1188mrcanelas wants to merge 19 commits intoStremio:developmentfrom
Conversation
…h and dispatch addon manifests
… addon already update
|
Hi, can you revert your change where you rewrote the whole component to typescript? |
|
I was told that all the code would be migrated to TS in the future, and I thought I would be helping. |
|
The components are rewritten when necessary, if we think they need refactoring or if it's easier for type definitions |
Done! |
|
what if we could instead just have one update button on header on the addons page? which would update all addons? wouldnt this be better? I guess some could error out if they are old but we could just show a toast |
We can do it this way too, just adding one more button instead of one for each add-on. I'll make the changes. |
…andling for addon updates
Done! |
this means we have the shared logic in core and can be implemented to other apps as well Co-Authored-By: Silas Alves <sialsan@hotmail.com>
Co-Authored-By: Silas Alves <sialsan@hotmail.com>
|
What is the point of this btw? Shouldn't we automatically update the manifests anyway since the server hosting the addon is always running the latest version? |
auto updating is expensive for our intra, this is a better approach IMO; user takes the action himself if necessary; you can update all or per add-on (during testing, setupping your account etc.) |
|
@mrcanelas i made the core side implementation and wired the dev package please test it 🙏🏼 |
|
is it that different from synchronizing the library? in core we just need to make a request to all the addons and update the old manifests locally, we then synchronize with our API if needed |
ig its a preference to include / exclude manual button technically it will be only a req to the addons, if all up to date we dont have req to api so its cool i did the core part so its easy to rewire and do it automatic instead of exposing an action if @mrcanelas has any reason why he want it to be a Ui button instead of auto update please feel free to share with us i'm open to discussion on this only thing im concerned about is that if a dev publishes a new version of the addon which has a bug (removal of a catalog or something similar which does not break the actual manifest; update would fail if it would) and we auto update all users manifests, add-on breaks for everyone. if its manual if a bad release is done users will use the old manifest which will work perfectly fine. and if somebody updates manually only for him the addon breaks and he needs to wait for a fix. edit: most users wont reconfigure their addons if everything already works, they arent even visiting the addons page, if something breaks for them without reconfiguring this would lead to online consequences, thats why IMO its better to be manual; they dont even know if a new version is released and what it includes, they are happy with their setup. (excluding users who are active to following addon updates that currently need to uninstall / install addon to update which breaks their addon order) |
I believe this button is a great addition. Today, with several custom list add-ons thanks to mdblist, every time a new list is added, the manifest changes, requiring reinstallation or the use of tools like Syncio, Stremio Addon Manager, and others. I think we should have native tools so users don't have to resort to other alternatives, especially simple things like an add-on update button. I don't know how automatic updates work today, if it's a cron job, but it's not instantaneous; when the add-on's manifest changes, it doesn't pass that information to Stremio in real time. |
Currently we don't have auto addon update of manifests functionality for users. FYI |
That's exactly why I believe this manual 'Update All' feature is so relevant right now. Since there is no automated sync for manifests, users are often stuck with outdated catalogs or broken resource links unless they go through the hassle of reinstalling. This implementation provides a reliable way for users to fetch the latest manifest.json on demand, solving the prioritization issue (maintaining the addon order) without adding the complexity or the overhead of a full background auto-update system at this stage. |
Botsy
left a comment
There was a problem hiding this comment.
@kKaskak @mrcanelas I tested and I honestly think it's a bit confusing why we have the update button if there is no update to an addon. I would suggest we rephrase it a bit into "Check for updates" or something like this. Which will then check if there is an update (and install it ?) and show success message, or show a message that the addon is up-to-date. Is it doable? Otherwise we're showing success messages but doing nothing.
| const hasUpdatableInstalledAddons = React.useMemo(() => { | ||
| if (installedAddons.selected === null) { | ||
| return false; | ||
| } | ||
| return installedAddons.catalog.some((addon) => | ||
| !addon.manifest?.behaviorHints?.configurationRequired && !addon.flags?.protected | ||
| ); | ||
| }, [installedAddons.selected, installedAddons.catalog]); |
There was a problem hiding this comment.
Is there a way we return true only if any of the addons needs to be updated to newer version? Right now we will have this as true for any unprotected addon that doesn't need configuration, even if there is no newer version?
we are already doing this, no? :D |
|
I agree we could only show the button when we have an update available; we would check against existing manifest vs the one fetched from the addon @Botsy |
|
I think this should be a "Reinstall" button, instead of an "Update" button. Sometimes there's no new version of an addon, but it still needs to be reinstalled to reflect changes to catalogs. AIOMetadata and AIOStreams even include a message after saving the configuration to tell the user if the changes require the addon to be reinstalled in Stremio in order to be able to see those changes. It's normal to tinker with the configuration during the setup process, and even every now and then when tastes change, a better idea to organize catalogs pop into your mind, a new addon appears and you want to try it out, etc Many users rely on Cinebye, Stremio Addon Manager, AIOManager and similar tools just to reinstall the addon. |
|
Updated the wording to better reflect the actual behavior.
This should avoid the confusion around showing a successful "update" when nothing has actually changed, while keeping the current behavior intact. |


Summary
This PR updates installed addons in place using core
UpgradeAddon, so addon order is preserved (no uninstall/reinstall flow).The UX was changed from per-addon update actions to a single “Update all” action in the Addons header (installed view), including a mobile-specific icon button layout.
Related issues
Closes #196
What changed
transportUrlCtx -> UpgradeAddonsequentially per addonAddonUpgraded/Errorwith sourceAddonUpgraded) per addonOther / code 5(Addon is protected) as skipped (not failed){count} addons updatedAll addons up to datewhen nothing changed and no real failuresIMDB Catalogs erro: 404)Why
Refreshing addon manifests previously required reinstalling addons, which could change addon order and impact result prioritization.
Using
UpgradeAddonin place keeps order stable and makes updates safer and faster for users.How to test
Name erro: 404);