feat: Integrate the AniList API since Jikan is shutting down

This commit is contained in:
2026-07-25 16:34:14 +02:00
parent 0dba2a9909
commit 6c2af9fc57
23 changed files with 40865 additions and 218 deletions

View File

@@ -317,9 +317,9 @@ class AnimeListBloc extends Bloc<AnimeListEvent, AnimeListState> {
);
// Update the cache
final cacheIndex = _mangas.indexWhere((m) => m.id == event.id);
final cacheIndex = _animes.indexWhere((m) => m.id == event.id);
assert(cacheIndex != -1, 'The anime must exist');
_mangas.removeAt(cacheIndex);
_animes.removeAt(cacheIndex);
// Update the database
await GetIt.I.get<DatabaseService>().deleteAnime(event.id);
@@ -338,9 +338,9 @@ class AnimeListBloc extends Bloc<AnimeListEvent, AnimeListState> {
);
// Update the cache
final cacheIndex = _animes.indexWhere((a) => a.id == event.id);
final cacheIndex = _mangas.indexWhere((a) => a.id == event.id);
assert(cacheIndex != -1, 'The manga must exist');
_animes.removeAt(cacheIndex);
_mangas.removeAt(cacheIndex);
// Update the database
await GetIt.I.get<DatabaseService>().deleteManga(event.id);