Conversation
There was a problem hiding this comment.
Pull request overview
This pull request attempts to switch the Addon Manager from downloading the curated addon catalog to downloading the full addon index. According to comments in the codebase, the index file is intended for versions of the Addon Manager after 2026-01-24, and contains all addons (both curated and uncurated), while the catalog file only contains curated addons for older versions.
Changes:
- Updated the default URL for
addon_catalog_cache_urlfromaddon_catalog_cache.ziptoaddon_index_cache.zip
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8222bd4 to
7d5e27a
Compare
ee11a51 to
b8e4ed2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c4320c7 to
2a10ac7
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| old_catalog_url = fci.Preferences().get("addon_catalog_cache_url") | ||
| if old_catalog_url.startswith("obsolete"): | ||
| return # Nothing to migrate, it was never set to anything else | ||
| fci.Console.PrintWarning("Custom catalog URL was detected: using as the index URL now\n") | ||
| fci.Console.PrintWarning(f"URL: {old_catalog_url}\n") | ||
| fci.Preferences().set("addon_index_cache_url", old_catalog_url) | ||
|
|
There was a problem hiding this comment.
migrate_catalog_to_index() will keep running on every startup for users who previously set a custom addon_catalog_cache_url (since the old value stays non-"obsolete"). That means it will repeatedly overwrite any user-chosen addon_index_cache_url and re-print warnings each run. Make this migration one-time (e.g., only migrate when addon_index_cache_url is still the default, and/or mark the old key as obsolete after copying, or add an explicit migration flag) so it doesn’t clobber later user configuration.
| old_catalog_url = fci.Preferences().get("addon_catalog_cache_url") | |
| if old_catalog_url.startswith("obsolete"): | |
| return # Nothing to migrate, it was never set to anything else | |
| fci.Console.PrintWarning("Custom catalog URL was detected: using as the index URL now\n") | |
| fci.Console.PrintWarning(f"URL: {old_catalog_url}\n") | |
| fci.Preferences().set("addon_index_cache_url", old_catalog_url) | |
| prefs = fci.Preferences() | |
| old_catalog_url = prefs.get("addon_catalog_cache_url") | |
| if not old_catalog_url or old_catalog_url.startswith("obsolete"): | |
| return # Nothing to migrate, it was never set to anything else or was already migrated | |
| fci.Console.PrintWarning("Custom catalog URL was detected: using as the index URL now\n") | |
| fci.Console.PrintWarning(f"URL: {old_catalog_url}\n") | |
| prefs.set("addon_index_cache_url", old_catalog_url) | |
| # Mark the old key as obsolete so this migration only runs once and does not | |
| # overwrite any future user configuration of addon_index_cache_url. | |
| prefs.set("addon_catalog_cache_url", f"obsolete:{old_catalog_url}") |
2a10ac7 to
111bd63
Compare
No description provided.