MyReadingManga: fix search + auto login + exclude videos#242
MyReadingManga: fix search + auto login + exclude videos#242kana-shii wants to merge 5 commits intoyuzono:masterfrom
Conversation
Reviewer's GuideThis 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
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt
Outdated
Show resolved
Hide resolved
src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt
Outdated
Show resolved
Hide resolved
src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt
Show resolved
Hide resolved
src/all/myreadingmanga/src/eu/kanade/tachiyomi/extension/all/myreadingmanga/MyReadingManga.kt
Outdated
Show resolved
Hide resolved
|
@kana-shii I fixed a bit. Maybe you bring this over to Keiyoushi? |
|
|
Will be trying to PR at least a part of this to Keiyoushi |
Most of it is based on a PR that was made in Keiyoushi, but got removed since.
Checklist:
extVersionCodevalue inbuild.gradlefor individual extensionsoverrideVersionCodeorbaseVersionCodeas needed for all multisrc extensionsisNsfw = trueflag inbuild.gradlewhen appropriateidif a source's name or language were changedweb_hi_res_512.pngwhen adding a new extensionSummary 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:
Bug Fixes:
Enhancements: