Commit graph

1101 commits

Author SHA1 Message Date
Moustapha Kodjo Amadou
d250c08424 refactor: update AndroidManifest and MainActivity for APK installation; remove flutter_app_installer dependency 2025-05-09 18:38:23 +01:00
Moustapha Kodjo Amadou
c558c08376 migrate to d4rt package 2025-05-09 17:47:27 +01:00
Moustapha Kodjo Amadou
b54aa3e2df
Merge pull request #449 from Schnitzel5/feature/epub
added support for epubs
2025-05-09 15:43:52 +01:00
Schnitzel5
843f5c505b + 2025-05-07 22:32:18 +02:00
Schnitzel5
24c4c89418 Merge branch 'temp/epub' into feature/epub 2025-05-07 22:25:11 +02:00
Schnitzel5
3677938bf8 added support for epubs
embedded images not supported yet
2025-05-07 22:17:23 +02:00
Schnitzel5
d6d674c270 + 2025-05-05 20:12:58 +02:00
Moustapha Kodjo Amadou
1751a0ca35 Update media_kit_video dependency to use git source 2025-05-05 15:46:24 +01:00
Moustapha Kodjo Amadou
e46975e381
Merge pull request #446 from NBA2K1/main
Refactor code, fix AniList/MAL bugs, add local scan (#148, #349)
2025-05-05 10:20:14 +01:00
NBA2K1
152f2d5969 Fix incorrect expiresIn in Kitsu and AniList
- Resolved the same timestamp conversion issue that affected MyAnimeList.
- Previously, seconds-to-milliseconds conversion and `DateTime.now()` were applied twice — once on `login()` and once in `_getAccessToken()` — resulting in incorrect expiry dates (e.g., year 57349).
- Updated Kitsu’s URL from `.io` to `.app`.
2025-05-05 02:33:55 +02:00
Schnitzel5
821366cb06 added epubx dependency 2025-05-04 23:45:46 +02:00
NBA2K1
73e7ad05f9 Fix MyAnimeList expiresIn retrieval
Remove incorrect expiresIn calculation in `OAuth.fromJson`. The `login()`
function of the MyAnimeList class already sets expiresIn as an absolute timestamp in milliseconds.
Multiplying by 1000 and adding the current timestamp in fromJson caused
expiresIn to be inflated, making the expiration check in `_getAccessToken()`
always false, skipping token refresh and returning an invalid token.
2025-05-04 22:36:54 +02:00
NBA2K1
1014c71f5c #148
Users can now add Mangas/Animes to a **manually** created Mangayomi/local folder.
Feature as described:
```
App Home Location/
  local/
    Manga Title/
      cover.jpg (optional)
      Chapter 1/
        1.jpg
        ...
      Chapter 2.cbz
      ...
    Anime Title/
      cover.png (optional)
      Episode 1.mp4
      Episode 2.mkv
```

The folder (if exist) will be scanned once per app start.

**Supported filetypes:** (taken from lib/modules/library/providers/local_archive.dart, line 98)
```
Videotypes:   mp4, mov, avi, flv, wmv, mpeg, mkv
Imagetypes:   jpg, jpeg, png, webp
Archivetypes: cbz, zip, cbt, tar
```
2025-05-02 13:44:37 +02:00
NBA2K1
4010d019ae Idk why I had removed the requirement 2025-05-02 13:13:14 +02:00
NBA2K1
34206dbc42 storage_provider trim()
trim whitespace to prevent Exception
2025-05-02 13:02:50 +02:00
Schnitzel5
e2a862d30b limited the amount of downloading operations
+ fixed failed downloads caused by spaces in file path
2025-05-02 02:10:57 +02:00
Schnitzel5
cc5bb1cd2a separated download function 2025-04-30 00:39:10 +02:00
NBA2K1
2698db6085 Reduce I/O operations
getMangaChapterDirectory() now accepts an optional mangaMainDirectory
to avoid calling getMangaMainDirectory() and thus getDirectory() twice in places where both methods are called successively.
2025-04-29 18:47:43 +02:00
NBA2K1
46526c6b6b Update download_provider.dart
Move the getDirectory() call out of the for loop to enhance performance.
2025-04-29 18:18:40 +02:00
Enbiya Olgun
b6ff9fe141 Update custom_navigation_settings.dart
No need for SingleChildScrollView, because ReorderableListView already is scrollable
2025-04-28 21:03:41 +02:00
Enbiya Olgun
c799c3451c rearranged Code
- New SettingsSection class to remove code duplication

- Moved the big ListTile+Dialog blocks in their own private methods:
_buildLanguageTile(),
_buildFontTile(),
_buildRelativeTimestampTile(),
_buildDateFormatTile()
2025-04-28 21:02:06 +02:00
Enbiya Olgun
7690f2cae1 FollowSystemThemeButton rearrangement
Show the FollowSystemThemeButton always on first positon, whether ON or OFF.

Before, the FollowSystemThemeButton was on first position if it was ON and in second position if it was OFF (DarkModeButton took the first position)
2025-04-28 18:52:20 +02:00
Schnitzel5
77b912d40e added download all option 2025-04-28 15:03:45 +02:00
Enbiya Olgun
7ca8db5fc6 DRY the code in router.dart
remove code duplication by introducing a helper method _genericRoute().
2025-04-28 03:18:36 +02:00
NBA2K1
843ed46269 Update library_screen.dart 2025-04-27 06:33:35 +02:00
Enbiya Olgun
d64f332f77 Added comment 2025-04-27 03:18:40 +02:00
Enbiya Olgun
6b4a86d2b5 Better UX for mobile
Better text rendering of "ignore filters" checkbox on mobile.
Adds a line break to mobile devices, where horizontal space is limited.
2025-04-27 03:15:04 +02:00
Enbiya Olgun
2a59ae7b70 variable, method name change 2025-04-26 05:19:15 +02:00
Enbiya Olgun
71a6358452 Fix #349
Added a checkbox "ignoreFiltersOnSearch" to the library search, so when checked, the whole library will be searched, not just the filtered library (Downloaded, Unwatched/Unread, Started, Bookmarked)

+ added some comments
2025-04-26 05:03:06 +02:00
Enbiya Olgun
1f118184ba Update m_bridge.dart
Remove code duplication.
2025-04-25 21:32:48 +02:00
Enbiya Olgun
20bb3cc5ce Update m_bridge.dart
DRY
2025-04-25 04:29:05 +02:00
Enbiya Olgun
ca4cee5751 Update m_client.dart
- getCookiesPref() and deleteAllCookies():
Avoid repeated parsing of `Uri.parse(url).host` by creating a variable.

- httpClient():
cache RhttpCompatibleClients and add default IOClient fallback.

- shouldAttemptRetryOnResponse():
Added a delay to avoid busy looping.
2025-04-25 02:43:33 +02:00
Enbiya Olgun
4f1e2cb492 Remove code duplication + BugFix
Fixed a bug, where newly added animes to AniList would register as "Rewatching" instead of "Plan to watch".
2025-04-24 05:48:52 +02:00
Schnitzel5
7e9202ceeb added extension notes/hints 2025-04-23 23:33:18 +02:00
Enbiya Olgun
404e18c4a5 introduce mangaReaderProvider and refactor MangaReaderView
- Add `ChapterWithPages` model and `MangaReaderController` (FamilyAsyncNotifier)
  to load chapter + pages in a single provider (`mangaReaderProvider`)
- Replace synchronous Isar fetch in `MangaReaderView` with `ref.watch(mangaReaderProvider)`
- Unify loading, error, and data states using a shared `scaffoldWith` helper
- Remove duplicated `Scaffold`/`AppBar` boilerplate and inline SystemChrome restore logic
- Simplify error handling
2025-04-23 00:11:20 +02:00
Schnitzel5
4a555a1bfc + 2025-04-22 23:48:41 +02:00
Schnitzel5
479a89042e Merge branch 'temp/optimize' into optimize 2025-04-22 22:42:46 +02:00
Schnitzel5
0ad836994d bottoast 2025-04-22 22:30:11 +02:00
Moustapha Kodjo Amadou
00d9b8373e
Merge pull request #445 from NBA2K1/main
Fix #444 + Kitsu detail change + episode/chapter name marquee effect
2025-04-22 09:05:09 +01:00
Enbiya Olgun
2446756552 moved super() call of initState to top of method 2025-04-22 04:57:52 +02:00
Enbiya Olgun
dabd0da206 App now adjusts theme without scheduler
Flutter already knows how to switch the theme automatically.
No need to listen to onPlatformBrightnessChanged.
This works on cold start.
Works when app is running and system theme changes.
And works when backup was done on different system theme and restore is being done on different system theme.
2025-04-22 04:55:46 +02:00
Enbiya Olgun
ffd776dbf1 tidy up main.dart and move theme handling to provider
removed code duplication
2025-04-22 03:53:28 +02:00
Enbiya Olgun
3ecbef80b2 Fix Exception
At line 963, when scrolling too fast in manga reader and page didn't load before.
```
═══════ Exception caught by foundation library ════════════════════════════════
The following StateError was thrown while dispatching notifications for ValueNotifier<Iterable<ItemPosition>>:
Bad state: No element
```
2025-04-22 03:49:31 +02:00
Enbiya Olgun
59b2389631 Fix Exception
```
════════ Exception caught by widgets library ═══════════════════════════════════
The following UnsupportedError was thrown building CircularProgressIndicator(100.0%, dependencies: [InheritedCupertinoTheme, _InheritedTheme, _LocalizationsScope-[GlobalKey#3b6da]], state: _CircularProgressIndicatorState#8c03b(ticker inactive)):
Unsupported operation: Infinity or NaN toInt

The relevant error-causing widget was:
    CircularProgressIndicator CircularProgressIndicator (package:mangayomi/modules/manga/reader/widgets/circular_progress_indicator_animate_rotate.dart:56:27)
```
2025-04-22 03:23:12 +02:00
Enbiya Olgun
3e2d7ed5bd check if System theme has been changed
Why was this removed?
2025-04-22 01:17:17 +02:00
Enbiya Olgun
b5d65168fb Fix Exception
```
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Bad state: Cannot use "ref" after the widget was disposed.
#0      ConsumerStatefulElement._assertNotDisposed (package:flutter_riverpod/src/consumer.dart:550:7)
consumer.dart:550
#1      ConsumerStatefulElement.read (package:flutter_riverpod/src/consumer.dart:619:5)
consumer.dart:619
#2      _MainScreenState.initState.<anonymous closure>.<anonymous closure> (package:mangayomi/modules/main_view/main_screen.dart:70:13)
main_screen.dart:70
#3      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:410:19)
timer_impl.dart:410
#4      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:441:5)
timer_impl.dart:441
#5      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:194:12)
isolate_patch.dart:194
```
2025-04-22 00:39:00 +02:00
Enbiya Olgun
6d99d9a690 Implemented text scroll to chapter/episode list
title text scroll (like a marquee effect) when the chapter/episode name is too long.
2025-04-21 22:47:23 +02:00
Enbiya Olgun
ef4abc47f2 Fix #444 + Remove code duplication
- Tracker Kitsu now displays "ì" correctly
- Removed a lot of code duplication in Kitsu.
2025-04-21 19:10:09 +02:00
Enbiya Olgun
dfade2f78e Kitsu no shows "Start date" and "Finish Date" when date is not set
Instead of "01 Jan 1970" show "Start date" and "Finish Date" on kitsu. Just like MyAnimeList
2025-04-21 19:05:01 +02:00
Schnitzel5
d4e768f6f7 added progress for updating the library 2025-04-17 23:15:59 +02:00