Commit graph

486 commits

Author SHA1 Message Date
NBA2K1
dd6ff2580a Use Platform Helper Everywhere Possible 2026-04-26 19:42:13 +02:00
NBA2K1
defb63f2df Redundant GetChapterPagesModel created per page
Each UChapDataPreload holds a GetChapterPagesModel that itself holds all pageUrls, archiveImages, etc. For a 50-page chapter this creates 50 model objects each referencing all 50 URLs.
2026-04-16 04:31:46 +02:00
NBA2K1
6ae2ac1a95 Why are there two searchproviders? 2026-04-15 23:41:47 +02:00
Moustapha Kodjo Amadou
4adc34ffaf Enhance torrent server functionality and performance 2026-04-13 12:43:13 +01:00
NBA2K1
81123dc3cb Change the MangasListStateProvider to Set<int>
MangasListState previously stored selected manga IDs as List<int>.
Every visible library card called .contains() on that list once per
rebuild to determine its highlight state, making each check O(n) in
the number of selected items. The provider's own update/selectAll/
selectSome methods also used .contains() and .remove() on a List.

Change the state type to Set<int> throughout, making all membership
checks O(1). Updated all consumers: library_gridview_widget,
library_listview_widget, library_app_bar, library_dialogs, and
MangasSetIsReadState.
2026-04-12 23:03:18 +02:00
Moustapha Kodjo Amadou
0df04bcfad feat #682 option to split chapter whe importing local epub 2026-04-07 11:55:42 +01:00
NBA2K1
271be91ce6 remove default compression level in settings model
because the default is already in the provider, so it is redundant.

+ regenerate provider
2026-04-06 16:04:23 +02:00
Moustapha Kodjo Amadou
21bbbdc012
Merge pull request #686 from NBA2K1/main
Revert commits
2026-04-05 22:56:36 +01:00
Moustapha Kodjo Amadou
f2f9bf9dd2
Merge pull request #684 from Schnitzel5/feature/mihon-integration
integrated ApkBridge for desktop
2026-04-05 22:25:20 +01:00
Schnitzel5
ef8a90165e integrated ApkBridge for desktop 2026-04-04 23:05:51 +02:00
NBA2K1
b760e37ff0 Revert "fix(reader): stabilize chapter progress and page cache writes"
This reverts commit 9f6bf93876.
2026-04-04 02:29:42 +02:00
NBA2K1
9b8b80545d Revert "fix(http): stabilize cloudflare resolver retry semantics"
This reverts commit 0049129853.
2026-04-04 02:29:37 +02:00
NBA2K1
5a841a6a34 Revert "fix(http): add webview html fallback for cloudflare-blocked gets"
This reverts commit 6c5d207612.
2026-04-04 02:29:34 +02:00
NBA2K1
0a634ab32f Revert "fix(http): align extension requests with WebView cookies and harden Cloudflare detection"
This reverts commit 2c4a4c688b.
2026-04-04 02:29:27 +02:00
Moustapha Kodjo Amadou
2e102f9db9 Update dependencies, refactor HTTP client handling and fix dart extension header handling 2026-04-03 12:13:11 +01:00
Moustapha Kodjo Amadou
003e2eda9c
Merge pull request #677 from MorningOctober/main
fix(reader): restore chapter read-state updates in continuous mode
2026-03-30 10:29:39 +01:00
Schnitzel5
90d4129295 added required api key via a cloudflare proxy 2026-03-28 20:54:39 +01:00
MorningOctober
2c4a4c688b fix(http): align extension requests with WebView cookies and harden Cloudflare detection
Problem
- Genz Updates could still return 403/Cloudflare in extension requests even when the same site worked in WebView.
- The extension HTTP path primarily used cached cookies from settings instead of reliably using the current WebView cookie jar.
- Cloudflare challenge detection was too narrow (mostly English markers) and could misclassify localized challenge pages as resolved.

Solution
- Prefer live WebView cookies for outgoing extension HTTP requests, with settings cookies as fallback.
- Sync cookie + user-agent from embedded WebView on onLoadStop in addition to history updates.
- Expand challenge detection with additional multilingual and platform markers.

Implementation Details
- Updated `MCookieManager.interceptRequest` to read cookies from `CookieManager.getCookies()` and use them as the request `Cookie` header when available.
- Added `_syncCookieAndUaFromWebView()` in `MangaWebView` and invoked it from both `onLoadStop` and `onUpdateVisitedHistory` to persist fresh clearance cookies immediately.
- Introduced a centralized `_cloudflareChallengePattern` in `m_client.dart` and reused it in `_containsCloudflareChallengeHtml` and `_isCloudflareChallengePage` for consistent challenge detection.
2026-03-28 18:17:13 +01:00
MorningOctober
6c5d207612 fix(http): add webview html fallback for cloudflare-blocked gets 2026-03-28 16:59:07 +01:00
MorningOctober
0049129853 fix(http): stabilize cloudflare resolver retry semantics 2026-03-28 16:45:51 +01:00
MorningOctober
9f6bf93876 fix(reader): stabilize chapter progress and page cache writes
- prevent stale settings overwrites by reloading settings inside Isar write txn before updating chapterPageUrlsList

- guard getPageLength() against missing chapter entries and empty urls to avoid No element crashes

- simplify read-threshold calculation in setPageIndex() via totalPages/pagesRemaining for continuous and paged modes

- map visible continuous double-page indices to actual page indices in _readProgressListener before persisting progress

- snapshot item positions and clamp indices during fast scrolling to avoid volatile first/last access races
2026-03-28 13:49:39 +01:00
Moustapha Kodjo Amadou
1256e608c7 Refactor 2026-03-02 11:49:19 +01:00
Moustapha Kodjo Amadou
099180bc34 feat: enhance RhttpCompatibleClient with cancel token support and improve error handling; add new target for Windows ARM64 2026-02-25 12:56:16 +01:00
Moustapha Kodjo Amadou
9d829a16e7 refactor: update DoH resolution method to use hostname first; improve circuit breaker logic 2026-02-25 11:52:18 +01:00
Moustapha Kodjo Amadou
7fe77dafde fix: ensure state is updated only when mounted; increase timer duration to 40 seconds 2026-02-23 15:25:54 +01:00
NBA2K1
e1fa1f75bc Improve failure message by using itemType.name
- Replace raw itemType (e.g. "ItemType.manga") with itemType.name (e.g. "manga") for better legibility.
2026-02-22 14:45:01 +01:00
Moustapha Kodjo Amadou
eec96c6258
Merge pull request #644 from NBA2K1/main
Improve extension service lifecycle, isolate robustness, dedupe lists, and UI/lifecycle cleanups
2026-02-13 10:50:32 +01:00
Moustapha Kodjo Amadou
7a47d5340c - 2026-02-02 12:34:52 +01:00
Schnitzel5
7c4ad924b1 added option to exclude categories from mass update 2026-01-31 00:14:39 +01:00
Moustapha Kodjo Amadou
ee41024a4f rename 2026-01-26 17:30:07 +01:00
Moustapha Kodjo Amadou
d5aecf66dc Fix #643 2026-01-26 17:28:25 +01:00
Moustapha Kodjo Amadou
b53e869258 feat: add DNS-over-HTTPS (DoH) support (experimental) 2026-01-20 14:38:46 +01:00
NBA2K1
8b1f7fc581 Add service disposal and lifecycle cleanup
This commit improves memory management, reduces redundant interpreter
instantiation, and standardizes service usage patterns.

- Add `dispose()` to `ExtensionService` interface and implement it across
  Dart, JS, LNReader, and Mihon services.
- Replace repeated interpreter creation in `DartExtensionService` with a
  persistent `_interpreter` instance initialized once in the constructor.
- Add disposal logic for JS DOM selector and Cheerio instances to prevent
  memory leaks.
- Introduce `withExtensionService()` helper to ensure services are always
  disposed after use.
- Update call sites across the codebase to use `withExtensionService()`
  or manual try/finally disposal.
- Improve isolate service message handling by extracting `responsePort`
  earlier.
- Ensure safer defaults (e.g., returning empty lists, const lists) when
  service calls fail.
2026-01-13 01:11:19 +01:00
Moustapha Kodjo Amadou
83b7d31e0a Increase isolate pool size to enhance concurrent download capabilities 2026-01-09 11:48:23 +01:00
NBA2K1
09684a2641 improve isolate lifecycle and add timeouts
- Add StreamSubscription to manage ReceivePort listener lifecycle
- Introduce handshake timeout when waiting for isolate SendPort to prevent hangs
- Add response timeout in get<T>() to avoid indefinitely waiting for isolate replies
- Replace direct ReceivePort.listen with tracked subscription for safer cleanup
- Improve error handling for invalid or missing isolate responses
- Strengthen isolate startup reliability and shutdown consistency
2026-01-08 22:41:14 +01:00
Moustapha Kodjo Amadou
74b194602c update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
Moustapha Kodjo Amadou
b9f9a8398f Refactor download management with shared isolate pool and optimize concurrent downloads 2026-01-08 13:01:15 +01:00
Moustapha Kodjo Amadou
9458ae120b fix #637 2026-01-07 13:07:55 +01:00
NBA2K1
004885d557 Return library updater if library empty 2025-12-29 01:00:01 +01:00
NBA2K1
c911594e73 Add logging and detailed botToast, remove doWhile
- Use the logger to log failed updates

- After the update-botToast another botToast is being spawned to show exactly which manga(s) couldn't be updated.

- Remove the doWhile loop because it is unnecessary. The condition of mangaList.length == numbers is always true, meaning it only runs once.
2025-12-28 23:08:54 +01:00
NBA2K1
9bd8a62d31 Reduce Code Duplication
Extract the `_updateLibrary()` function from `updates_screen.dart` and `library_screen.dart` to a top-level function in `libray_updater.dart`.
2025-12-28 22:59:44 +01:00
Moustapha Kodjo Amadou
76645d97c1 fix: improve error handling for Cloudflare bypass failures 2025-12-14 14:01:40 +01:00
Moustapha Kodjo Amadou
23e41373dc conditionally show Android proxy server option and update notes 2025-12-10 13:42:34 +01:00
Moustapha Kodjo Amadou
6e4d3dd52e feat(server): add server check before starting 2025-12-10 13:38:15 +01:00
Moustapha Kodjo Amadou
1b708d6884 feat(server): integrate MExtensionServer 2025-12-08 15:14:12 +01:00
NBA2K1
5fdbf530cb stopCfResolutionWebviewServer()
Stop the cf server on app exit
2025-11-29 00:18:13 +01:00
NBA2K1
5c34dcab9a Start Cloudflare resolution after app starts
- Defer the Cloudflare resolution webserver until after runApp().

- await said function
2025-11-28 23:59:37 +01:00
Moustapha Kodjo Amadou
405c3d8e35 fix 2025-11-25 15:34:38 +01:00
Moustapha Kodjo Amadou
f06df9b3b1 feat: implement CF resolution server 2025-11-25 14:53:22 +01:00
Moustapha Kodjo Amadou
1d81906c4f refactor: update message handling in GetIsolateService to use listen instead of for loop 2025-11-25 14:06:47 +01:00