Skip to content

fix(MangaDemon): fix blurred search/home page thumbnail by hardcoding content rating#214

Merged
celarye merged 2 commits into
inkdex:0.9/stablefrom
mjishnu:0.9/stable
Jun 13, 2026
Merged

fix(MangaDemon): fix blurred search/home page thumbnail by hardcoding content rating#214
celarye merged 2 commits into
inkdex:0.9/stablefrom
mjishnu:0.9/stable

Conversation

@mjishnu

@mjishnu mjishnu commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

both home page and search page showed blurred thumbnail due to content rating not being set, paperback by default blurs unrated content. the homepage/search page doesn't have any flag to use for custom content rating so switch to hardcoded "safe" value since managdemon is not a mature.
WhatsApp Image 2026-06-12 at 4 07 49 PM WhatsApp Image 2026-06-12 at 4 07 06 PM

Checklist

Making changes

For updates to existing extensions

  • Bumped the version value in pbconfig.ts for each modified extension.

For new extensions

  • Generated tests with npx paperback-cli test --generate EXTENSION_NAME.

Testing changes

  • npm run conformance passes.
  • npm test -- EXTENSION_NAME passes.
  • Bundled the extension and verified it works in the Paperback app.

Committing changes

  • Commit messages follow the existing convention (type(Scope): summary, e.g. fix(EXTENSION_NAME): ...).

AI assistance

Pick one:

  • This PR contains no AI-assisted changes.
  • This PR is AI-assisted. I manually reviewed every change and added an Assisted-by: AGENT_NAME:MODEL_VERSION trailer to each AI-assisted commit.

@mjishnu mjishnu changed the title fix(ManagDemon): fix blurred search/home page thumbnail by hardcoding content rating fix(ManagaDemon): fix blurred search/home page thumbnail by hardcoding content rating Jun 12, 2026
@mjishnu mjishnu changed the title fix(ManagaDemon): fix blurred search/home page thumbnail by hardcoding content rating fix(MangaDemon): fix blurred search/home page thumbnail by hardcoding content rating Jun 12, 2026
@niclimcy

Copy link
Copy Markdown
Contributor

Why not set the content rating only at where it returns the results to the app, setting content rating multiple places and changing the model seems a bit excessive

mjishnu and others added 2 commits June 12, 2026 23:54
- Site does not provide content rating
- Fixes blurred search/home page thumbnail
@mjishnu

mjishnu commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Why not set the content rating only at where it returns the results to the app, setting content rating multiple places and changing the model seems a bit excessive

refactored as per your suggestion.

@niclimcy

Copy link
Copy Markdown
Contributor

Wait no, don't overwrite the commit I made, it was ok already

@niclimcy niclimcy requested a review from celarye June 12, 2026 18:00
@niclimcy niclimcy added the bug Something isn't working label Jun 12, 2026
@mjishnu

mjishnu commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Wait no, don't overwrite the commit I made, it was ok already

huh I didn't overwrite though? the force push is actually commit rename i did since there was a typo in it.

I just moved the loops and content rating to a common function into main.ts (no parser.ts clutter) wasn't this your recommendation though? the current code content ratting is set in like 6 places and the same loop is duplicated in multiple places isn't just placing them in a common function better or are there any specific reason you did code duplication?

  private registerItems<T extends { mangaId?: string; contentRating?: ContentRating }>(
    items: T[],
  ): T[] {
    for (const item of items) {
      if (item?.mangaId) {
        this.idMap[item.mangaId.replace(/[^a-zA-Z0-9]/g, "")] = item.mangaId;
      }
      if (item) item.contentRating = ContentRating.EVERYONE;
    }
    return items;
  }

btw i am new to this extension development i just did this since mangademon is a source i use and the blur was annoying i am fine with any approach as long as the issue is resolved

Comment thread src/MangaDemon/main.ts
Comment thread src/MangaDemon/main.ts
Comment thread src/MangaDemon/parsers.ts
@celarye celarye merged commit d47aeaf into inkdex:0.9/stable Jun 13, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants