Skip to content

fix(catalogs): bring back an addon's deleted rows when it is installed again - #859

Merged
ProdigyV21 merged 1 commit into
ProdigyV21:mainfrom
silentbil:feature/restore-reinstalled-addon-rows
Nov 2, 2026
Merged

ProdigyV21 merged 1 commit into
ProdigyV21:mainfrom
silentbil:feature/restore-reinstalled-addon-rows

Conversation

@silentbil

Copy link
Copy Markdown
Collaborator

Problem

Deleting an addon row in Settings → Catalogs saves the row id to the profile's hidden-addon list, so the next addon sync doesn't re-create it from the manifest. Row ids are stable (addon_<hash of addonId|type|catalogId>), and nothing ever clears that list.

As a result, if you delete an addon's rows, uninstall the addon and later install it again, its rows never come back. The install toast still says the addon has N catalogs, but Home shows none of them, and the app has no way to restore them. The list is also cloud-synced, so the rows stay hidden on every device.

Fix

  • New CatalogRepository.restoreHiddenAddonCatalogs(addon) removes the installed addon's row ids from the active profile's hidden-addon list. It writes through writeCatalogField, so the change gets a fresh cloud timestamp and syncs to other devices, and it resets the sync fingerprint.
  • SettingsViewModel.installAddon calls it just before syncAddonCatalogs. This covers adding an addon by URL and installing from a link (stremio://).

What doesn't change:

  • Deleting a row while the addon stays installed still keeps it hidden.
  • Hidden rows that belong to other addons stay hidden.

Testing

  • New Robolectric test CatalogDeletionSyncTest.reinstallingAddonRestoresOnlyItsOwnDeletedRows. It sets up two addons, deletes all their rows, restores one addon, and checks that only its rows come back and that the hidden list gets a cloud timestamp. All 11 tests in the class pass.
  • Android TV emulator (API 30): an addon with 4 catalogs had all 4 rows on the hidden list. After reinstalling it from a stremio:// link, its ids left the list, the other hidden ids stayed, and all 4 rows showed on Home with cards.

…d again

Deleting an addon row stores its id in the profile's hidden-addon list so the
next sync doesn't re-create it from the manifest. Row ids are stable per addon
and catalog, and nothing ever clears that list, so after uninstalling and
reinstalling an addon its rows stayed hidden with no way to restore them.

Installing an addon now removes that addon's row ids from the hidden list
before the catalog sync. Rows of other addons stay hidden, and deleting a row
while the addon stays installed still sticks.
@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Nov 2, 2026
@ProdigyV21
ProdigyV21 merged commit 0d26a87 into ProdigyV21:main Nov 2, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: android Changes to the Android app or Gradle build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants