Fix module repository loading and missing README rendering#747
Conversation
|
Thanks for working on this. I pulled and tested the PR locally. What looks good:
One regression I noticed:
So it may be better to keep a separate web base URL for A smaller robustness note: |
|
I opened a small follow-up PR at #765 with the two adjustments mentioned above: keeping the browser URL on the public web host, and surfacing non-2xx / empty API responses as load failures. Thanks again for the original fix and investigation here. If maintainers prefer this to stay in #747 instead, the changes should be straightforward to fold back. |
Use the working backup repository API endpoint for module JSON, surface failed HTTP responses, and load full module details when README content is missing. Keeps the browser action on the public modules.lsposed.org web page because the backup host only serves the JSON API. Builds on the approach from JingMatrix#747 by byemaxx. Co-authored-by: Qing <44231502+byemaxx@users.noreply.github.com>
…ingMatrix/vector JingMatrix#747: Fix repository README refresh handling & module loading JingMatrix#765: Fix module repository loading (restore endpoint fallbacks) JingMatrix#750: Add upstream repository source selection in settings RepoLoader.java: merged JingMatrix#765 array-based URL fallback with JingMatrix#750 user-selectable source
… refresh, module repo loading fix, repo source selection
Use the working backup repository API endpoint for module JSON, surface failed HTTP responses, and load full module details when README content is missing. Keeps the browser action on the public modules.lsposed.org web page because the backup host only serves the JSON API. Builds on the approach from JingMatrix#747 by byemaxx. Co-authored-by: Qing <44231502+byemaxx@users.noreply.github.com>
The module repository loader stopped working against the current LSPosed endpoints. This reworks the loader end to end and hardens the repo detail UI against refresh races. RepoLoader: - Try repository mirrors in order (backup.modules.lsposed.org first, then modules.lsposed.org and the blogcdn/cloudflare mirrors), instead of the old origin/backup/second-backup chain. - Treat non-2xx responses and empty/blank bodies as load failures via a shared requestString() helper, and reject unparseable JSON. - Restore the loaded state and notify listeners after a failed refresh so the UI does not stay stuck refreshing; keep previously cached data when a remote refresh fails. - Parse the payload directly on success instead of re-reading the file, and retry per-module detail across all mirrors on failure/parse error. RepoItemFragment: - Load full per-module JSON when README/release detail is missing, then refresh the README tab once it arrives. - Prefer this fragment's already-detailed module over the leaner modules.json summary after a repo refresh, avoiding README/release flicker back to empty/truncated content. - Only show the "no more releases" hint for user-initiated loads, and clear the fetch guard on view teardown, detail load, and errors. - Skip redundant README WebView reloads when the content is unchanged, and guard the release list against a null items list. - Keep the "Open in browser" action on modules.lsposed.org, whose per-module web page (unlike the JSON API) has no .json suffix. Fixes JingMatrix#715 Follow-up to JingMatrix#747 Co-authored-by: Shallow <ShallowDusty233@gmail.com> Co-authored-by: Qing <44231502+byemaxx@users.noreply.github.com>
Summary
Fix module repository loading by switching to the new official LSPosed backup CDN endpoint,
https://backup.modules.lsposed.org/.The previous repository endpoints and fallback mirrors are deprecated because the official LSPosed manager has moved to a newer CDN-backed repository request mechanism. The new official backup CDN endpoint remains compatible with the legacy repository API format used by this manager:
<base>/modules.json<base>/module/<package>.jsonThis allows the existing repository loading logic to keep working without migrating this manager to the newer official request mechanism.
This PR also fixes README rendering on the module detail page. Some module entries from
modules.jsondo not include full README content. When README content is missing, the manager now loads the per-module JSON and refreshes the README view after the full module data is available.Changes