Add IReader extension support to Suwayomi-Server#1784
Add IReader extension support to Suwayomi-Server#1784kazemcodes wants to merge 37 commits intoSuwayomi:masterfrom
Conversation
kazemcodes
commented
Nov 12, 2025
- Integrated IReader source-api (38 files) for novel/light novel reading
- Created separate database tables for IReader extensions and sources
- Implemented extension management (install, update, uninstall)
- Added REST API endpoints under /api/v1/ireader/
- Full parallel operation with existing Tachiyomi functionality
- Zero breaking changes to existing code
- Comprehensive documentation included
- Integrated IReader source-api (38 files) for novel/light novel reading - Created separate database tables for IReader extensions and sources - Implemented extension management (install, update, uninstall) - Added REST API endpoints under /api/v1/ireader/ - Full parallel operation with existing Tachiyomi functionality - Zero breaking changes to existing code - Comprehensive documentation included
- Add IReader source API interfaces (Source, CatalogSource, HttpSource, SourceFactory) - Implement IReader extension loading following Tachiyomi pattern - Add database tables for IReader extensions and sources - Add API controllers for IReader extensions and sources - Support loading IReader Android APKs via dex2jar conversion - Add extension management (install, uninstall, update) - Add IReader source listing and retrieval
|
Interesting, your are the dev of IReader? I'm not against novel support for Suwayomi. A few notes to start with.
|
- Fix deprecated -Xcontext-receivers to -Xcontext-parameters - Fix KtLint violations (package names, wildcard imports, file naming) - Add missing findInstance extension functions - Fix task dependencies in build.gradle.kts - Reorganize package structure (core_api -> coreapi) - Add comprehensive IReader documentation
|
yes, I'm dev of IReader, I will try to fix the issue you mentioned, |
… replaced with concrete JVM implementations.
|
I complete all changes you mentioned
|
|
Its a start. I will do a more in-depth review when I have time. The GraphQL parts are not complete but I can also tell you what's needed later. |
server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/IReaderExtensionMutation.kt
Outdated
Show resolved
Hide resolved
| import suwayomi.tachidesk.server.JavalinSetup.future | ||
| import java.util.concurrent.CompletableFuture | ||
|
|
||
| class IReaderExtensionQuery { |
There was a problem hiding this comment.
This implementation is wrong, it should mimic the ExtensionQuery and ExtensionMutation classes.
Any query that changes the database needs to be a mutation, and (almost) all database tables should have a dedicated Query class.
There was a problem hiding this comment.
This class still deviates quite a bit from the ExtensionQuery class. It doesn't implement proper sorting, filtering, and adds a bunch of useless queries. Change it to mimic the ExtensionQuery class
| import suwayomi.tachidesk.server.JavalinSetup.future | ||
| import java.util.concurrent.CompletableFuture | ||
|
|
||
| class IReaderNovelQuery { |
There was a problem hiding this comment.
This is a group of mutations that should be split up into multiple several files, try to mimic the Manga side when creating these variants.
There was a problem hiding this comment.
This is not mimicing the MangaQuery class.
There was a problem hiding this comment.
can you check this file again, does it now meets you expectation now?
|
I made some changes, when you had time check them out |
server/src/main/kotlin/ireader/core/source/model/PageListEmpty.kt
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/org/ireader/coreapi/prefs/PreferenceStore.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Why are we using a novelUrl instead of a database id?
There was a problem hiding this comment.
The current design uses novelUrl because this mutation is intended for source-level browsing - fetching novel content directly from IReader sources without requiring the novel to be persisted in the database first. This allows users to preview content before adding novels to their library.
There was a problem hiding this comment.
Why are we using a chapter url instead of a database id?
There was a problem hiding this comment.
The current design uses chapterUrl because this mutation is intended for source-level browsing - fetching chapter content directly from IReader sources without requiring the chapter to be persisted in the database first. This allows users to preview content before adding novels to their library.
| import suwayomi.tachidesk.server.JavalinSetup.future | ||
| import java.util.concurrent.CompletableFuture | ||
|
|
||
| class IReaderNovelQuery { |
There was a problem hiding this comment.
This is not mimicing the MangaQuery class.
server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/IReaderSourceQuery.kt
Show resolved
Hide resolved
server/src/main/kotlin/suwayomi/tachidesk/graphql/types/IReaderNovelTypes.kt
Outdated
Show resolved
Hide resolved
|
@kazemcodes this is cool, hope you continue |
# Conflicts: # server/build.gradle.kts # server/src/main/kotlin/ireader/core/http/BrowserEngine.kt # server/src/main/kotlin/ireader/core/http/Exception.kt # server/src/main/kotlin/ireader/core/http/HttpClientExtJVM.kt # server/src/main/kotlin/ireader/core/http/HttpClients.kt # server/src/main/kotlin/ireader/core/http/JS.kt # server/src/main/kotlin/ireader/core/http/JSFactory.kt # server/src/main/kotlin/ireader/core/http/PersistentCookieStore.kt # server/src/main/kotlin/ireader/core/http/WebViewManger.kt # server/src/main/kotlin/ireader/core/http/WebViewUtil.kt # server/src/main/kotlin/ireader/core/log/Log.kt # server/src/main/kotlin/ireader/core/source/CatalogSource.kt # server/src/main/kotlin/ireader/core/source/ErrorHandling.kt # server/src/main/kotlin/ireader/core/source/Ext.kt # server/src/main/kotlin/ireader/core/source/HttpSource.kt # server/src/main/kotlin/ireader/core/source/ParsedHttpSource.kt # server/src/main/kotlin/ireader/core/source/ParsingUtils.kt # server/src/main/kotlin/ireader/core/source/Source.kt # server/src/main/kotlin/ireader/core/source/SourceFactory.kt # server/src/main/kotlin/ireader/core/source/model/ChapterInfo.kt # server/src/main/kotlin/ireader/core/source/model/Command.kt # server/src/main/kotlin/ireader/core/source/model/Filter.kt # server/src/main/kotlin/ireader/core/source/model/FilterList.kt # server/src/main/kotlin/ireader/core/source/model/MangasPageInfo.kt # server/src/main/kotlin/ireader/core/source/model/Page.kt # server/src/main/kotlin/ireader/core/util/CoroutineExt.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/MangaAPI.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/IReaderSource.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/ireader/IReaderExtension.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/ireader/IReaderExtensionsList.kt # server/src/main/kotlin/suwayomi/tachidesk/manga/impl/extension/ireader/IReaderGithubApi.kt
there is another problem with dex2jar |
|
I think the issue is with coroutines current versions, there seems to be some problem with it, not sure, it works fine before with any issue without flag, but after I updated the my source-api module in order to create even better sources, this bug happens here , |
|
Try making sure the extensions don't include any dependencies in its apks. Use the Android Studio APK explorer. For example when I implemented Apollo in the Suwayomi extension it pulled in other dependencies that conflicted with the apps dependencies. Otherwise that verify error sounds familiar, but I forget where. |
I will try to find a solution for this problem |
|
I think I remember where I encountered that error before. |
I tried multiple ways to fix this issue, and after trying every thing,I decided to not use dex2jar at all, directly using .jar files that main ireader-extensions repo create , |
|
can you recheck the new file changes, I almost resolved all things you mentioned |
There was a problem hiding this comment.
This file shouldn't be added to the repo.
There was a problem hiding this comment.
These novels need to be in the database at this point. We cannot serve data that is not saved. They also need database ids so that we can use them later.
There was a problem hiding this comment.
These chapters need to be in the database at this point. We cannot serve data that is not saved. They also need database ids so that we can use them later.
| import suwayomi.tachidesk.server.JavalinSetup.future | ||
| import java.util.concurrent.CompletableFuture | ||
|
|
||
| class IReaderNovelQuery { |
| data class IReaderChapterType( | ||
| val name: String, | ||
| val key: String, | ||
| val dateUpload: Long, | ||
| val number: Float, | ||
| val scanlator: String, | ||
| ) { | ||
| constructor(chapterInfo: ChapterInfo) : this( | ||
| name = chapterInfo.name, | ||
| key = chapterInfo.key, | ||
| dateUpload = chapterInfo.dateUpload, | ||
| number = chapterInfo.number, | ||
| scanlator = chapterInfo.scanlator, | ||
| ) | ||
| } |
There was a problem hiding this comment.
Chapters should be in the database
|
Thanks for review, I will fix the issue you mentioned later |
|
Any more issues? |
|
There is still a bunch of comments that need to be addressed from my previous review |
|
Really looking forward for this |
|
yo this is hype really waiting for LN support and maybe anime if possible it'd be the ultimate all in 1 app |