Skip to content

feat(multisrc): skip sources marked down - #2757

Open
RikCost wants to merge 2 commits into
lnreader:masterfrom
RikCost:feat/multisrc-skip-down
Open

RikCost wants to merge 2 commits into
lnreader:masterfrom
RikCost:feat/multisrc-skip-down

Conversation

@RikCost

@RikCost RikCost commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Sources marked "options": { "down": true } in a generator's sources.json were still generated and published as working plugins: no generator and neither generate-multisrc-plugins.js nor build-plugin-manifest.js read the flag. Dead sites therefore stayed in the app's plugin list and failed when used, e.g. in global search (JSON Parse error: Unexpected character: < for EzNovels and MTL Novel (RU)). This was raised in the review of #2746.

Changes

  • New plugins/multisrc/activeSources.js: a small helper that filters out sources with options.down and logs which ones were skipped ([madara]: Skipping down source …).
  • All 13 generators now take their list through it (const list = activeSources(allSources, '<generator>')), a two-line change each. The entries stay in sources.json, so marking and unmarking a source keeps working as before.
  • generate-multisrc-plugins.js removes each generator's previous output before writing the new one (only after generateAll succeeded). dev:start runs generation without clean:multisrc, so otherwise skipped or renamed sources would linger in an existing checkout and in the playground.

This currently stops generating 36 sources that are already marked down (18 madara, 7 lightnovelwp, 4 hotnovelpub, 3 webnovelworld, 2 readwn, 1 fictioneer, 1 mtlnovel). Users who already installed one keep it; it just disappears from the published list.

Testing

  • npm run build:multisrc before/after: 162 → 126 generated plugins; exactly the 36 down sources disappear, none are added, all 13 generators run without errors and log the skipped sources.
  • Full build (tsc + build:manifest): the manifest no longer contains the down sources (285 plugins); working sources are unchanged.
  • Generation without cleaning (as dev:start does) over leftover files of EzNovels, MTL Novel (RU) and a renamed source removes them and leaves exactly the 126 current plugins; standalone plugins are untouched, and a generator that throws keeps its previous output.
  • npm run lint on the changed files passes.
  • Tested by the author in the LNReader app on Android through a plugin repository built from this branch: EzNovels and MTL Novel (RU) no longer appear in the plugin list.

Related: #2746 (review comment "Dead sources still look available").

Checklist

  • Update version code if an existing plugin was modified (not needed: no plugin code changes, down sources are only no longer generated)
  • Test changes in Plugin Playground or the app
  • Reference related issues in the PR body (e.g. Closes #xyz)
  • Commit messages follow type(scope): description (e.g. feat(<generator>): add new source)

This change was written with an AI coding agent (Claude Code) and reviewed and tested by the author.

🤖 Generated with Claude Code

Sources with "options": { "down": true } in a generator's sources.json
were still generated and published as working plugins, so dead sites
showed up in the app and failed (e.g. in global search). Every generator
now filters its list through a shared activeSources helper that skips
them and logs which ones were skipped. The entries stay in sources.json.

This currently removes 36 down sources from the generated plugins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects which multisource plugins appear in new catalogs.

Safe to merge with a non-blocking cleanup gap in the playground command.

Findings

  1. P2 Down sources remain in playground ▶

Summary

Adds activeSources and uses it in all 13 generators to skip sources marked down.

  • Multisource builds skip sites marked as down.

Reviews (1) · Last reviewed commit: "feat(multisrc): skip sources marked down" · Reviewed by Greptile

Comment thread plugins/multisrc/activeSources.js
dev:start runs generation without clean:multisrc, so plugins of sources
that are now skipped (marked down) or renamed stayed on disk and in the
playground. Each generator's old files are removed once generateAll has
succeeded, so a broken generator keeps its output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant