Skip to content

MyReadingManga: fix search + auto login + exclude videos#242

Closed
kana-shii wants to merge 5 commits intoyuzono:masterfrom
kana-shii:mrm-fix
Closed

MyReadingManga: fix search + auto login + exclude videos#242
kana-shii wants to merge 5 commits intoyuzono:masterfrom
kana-shii:mrm-fix

Conversation

@kana-shii
Copy link
Contributor

@kana-shii kana-shii commented Sep 25, 2025

Most of it is based on a PR that was made in Keiyoushi, but got removed since.
Checklist:

  • Updated extVersionCode value in build.gradle for individual extensions
  • Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions
  • Referenced all related issues in the PR body (e.g. "Closes #xyz")
  • Added the isNsfw = true flag in build.gradle when appropriate
  • Have not changed source names
  • Have explicitly kept the id if a source's name or language were changed
  • Have tested the modifications by compiling and running the extension through Android Studio
  • Have removed web_hi_res_512.png when adding a new extension

Summary by Sourcery

Enable auto-login with user-configurable credentials, overhaul search filters and pagination, exclude video content from listings, enhance metadata parsing, migrate to coroutine-based detail fetching, update filter extraction, refresh language sources list, and bump extension version

New Features:

  • Add auto-login support with configurable username and password preferences
  • Refactor search to use WordPress 's' parameter with updated pagination and filter logic

Bug Fixes:

  • Fix search functionality and pagination selectors

Enhancements:

  • Exclude video entries from popular, latest, and search results
  • Improve title cleaning, chapter labeling, and add additional manga statuses
  • Migrate manga details fetching from Rx to coroutine await

@sourcery-ai
Copy link

sourcery-ai bot commented Sep 25, 2025

Reviewer's Guide

This PR fixes the search flow by excluding video entries, adds auto-login via preferences, migrates network calls to coroutines with improved parsing, overhauls filter discovery, and bumps the extension version with updated language configurations.

File-Level Changes

Change Details Files
Add configurable auto-login support
  • Store credentials in SharedPreferences
  • Implement loginInterceptor to perform login before requests
  • Add a configurable PreferenceScreen for username/password input
MyReadingManga.kt
Migrate HTTP calls to coroutines and enhance parsing
  • Replace RxJava calls (asObservableSuccess, Observable) with await() and suspend functions
  • Update getMangaDetails signature and remove deprecated Observable usage
  • Improve cleanTitle logic and extend status mapping (Licensed, Dropped, Hiatus, etc.) and refine author extraction
MyReadingManga.kt
Exclude video content and fix selectors
  • Update popular/latest/search selectors to filter out video elements and vlcsnap thumbnails
  • Point popularMangaRequest to /popular/ endpoint
  • Enable proper pagination selectors for search and popular flows
MyReadingManga.kt
Overhaul filter parsing logic
  • Replace raw HTML caching map with mainPage/searchPage buffers
  • Implement getFiltersFromMainPage and getFiltersFromSearchPage
  • Introduce MrmFilter and UriFilter interfaces and refactor filter classes
  • Update getFilterList to use new filter sources
MyReadingManga.kt
Update language sources list and bump version code
  • Adjust and rename entries in languageList for correct slugs and order
  • Increment extVersionCode to 59 in build.gradle
MyReadingMangaFactory.kt
build.gradle

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kana-shii, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers crucial updates to the MyReadingManga extension, primarily addressing breaking changes on the source website. It introduces an automatic login capability, which is essential for accessing certain content. Furthermore, the core browsing and search functionalities have been re-engineered to correctly interpret the site's new structure and filter out irrelevant video content. The filter system has also been upgraded to be more dynamic and comprehensive, ensuring users can effectively narrow down their searches. These changes collectively aim to restore and improve the extension's reliability and user experience.

Highlights

  • Automatic Login: Implemented an automatic login feature for MyReadingManga, allowing users to configure their username and password within the extension preferences for seamless access to restricted content.
  • Search and Browsing Overhaul: Completely refactored the search, popular manga, and latest updates functionalities to align with recent website changes, ensuring accurate content retrieval and explicitly excluding video entries from results.
  • Dynamic Filter System: Introduced a new, dynamic filter parsing mechanism that fetches available filters directly from the website's main and search pages, supporting new filter types like Artist and Status, and improving the overall filtering experience.
  • Manga Details and Status Improvements: Enhanced the parsing of manga details, including a more robust title cleaning logic and an expanded mapping for manga statuses (e.g., Licensed, Dropped, Hiatus).
  • Extension Version Update: The extension version code has been incremented to 59, reflecting the significant updates and fixes included in this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt:98` </location>
<code_context>
+                isLoggedIn = true
+                return chain.proceed(request)
+            } else {
+                Toast.makeText(Injekt.get<Application>(), "MyReadingManga login failed. Please check your credentials.", Toast.LENGTH_LONG).show()
+            }
+            return chain.proceed(request)
</code_context>

<issue_to_address>
**issue (bug_risk):** Using Toast in a network interceptor may cause issues.

Toast should not be shown from a background thread; use main thread posting or a different error reporting method.
</issue_to_address>

### Comment 2
<location> `src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt:241` </location>
<code_context>
         return SManga.create().apply {
             title = cleanTitle(document.select("h1").text())
-            author = cleanAuthor(document.select("h1").text())
+            author = document.select(".entry-terms a[href*=artist]").firstOrNull()?.text()
             artist = author
             genre = document.select(".entry-header p a[href*=genre], [href*=tag], span.entry-categories a").joinToString { it.text() }
</code_context>

<issue_to_address>
**suggestion:** Author extraction now relies on a specific selector.

Consider adding a fallback for author extraction in case the selector does not match or the HTML structure changes.

```suggestion
            author = document.select(".entry-terms a[href*=artist]").firstOrNull()?.text()
                ?: cleanAuthor(document.select("h1").text())
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces significant improvements and fixes to the MyReadingManga extension. It adds an auto-login feature with configurable credentials, overhauls the search and filter functionality to align with website changes, and excludes video content from manga listings for a cleaner experience. The code has also been modernized by migrating some parts from RxJava to coroutines. My feedback focuses on improving robustness and maintainability. I've suggested logging exceptions in the login flow for easier debugging, making URL parsing for filters more resilient to changes, and a minor code style improvement for readability.

@cuong-tran
Copy link
Contributor

cuong-tran commented Dec 29, 2025

@kana-shii I fixed a bit. Maybe you bring this over to Keiyoushi?

@kana-shii
Copy link
Contributor Author

@kana-shii I fixed a bit. Maybe you bring this over to Keiyoushi?
I forgot completely about this lmao
MyReadingManga has since been fixed in Keiyoushi itself, but I think it would be valuable to throw the video filtering parts of the code to Keiyoushi. I already saw the auto login being rejected in an issue, but the rest could be done. Ty for remembering me. I'll try working on that

@kana-shii
Copy link
Contributor Author

Will be trying to PR at least a part of this to Keiyoushi

@kana-shii kana-shii closed this Feb 7, 2026
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants