mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-20 23:22:07 +00:00
Fix #164
This commit is contained in:
parent
73297d6e39
commit
001de1d07e
2 changed files with 4 additions and 3 deletions
|
|
@ -453,7 +453,7 @@ class Kitsu extends _$Kitsu {
|
|||
final expiresIn = DateTime.fromMillisecondsSinceEpoch(mAKOAuth.expiresIn!);
|
||||
if (DateTime.now().isAfter(expiresIn)) {
|
||||
ref.read(tracksProvider(syncId: syncId).notifier).logout();
|
||||
botToast("Anilist Token expired");
|
||||
botToast("Kitsu Token expired");
|
||||
throw Exception("Token expired");
|
||||
}
|
||||
return mAKOAuth.accessToken!;
|
||||
|
|
|
|||
|
|
@ -89,8 +89,9 @@ class MyAnimeList extends _$MyAnimeList {
|
|||
await http.get(url, headers: {'Authorization': 'Bearer $accessToken'});
|
||||
final res = jsonDecode(result.body) as Map<String, dynamic>;
|
||||
|
||||
List<int> mangaIds =
|
||||
(res['data'] as List).map((e) => e['node']["id"] as int).toList();
|
||||
List<int> mangaIds = res['data'] == null
|
||||
? []
|
||||
: (res['data'] as List).map((e) => e['node']["id"] as int).toList();
|
||||
List<TrackSearch> trackSearchResult = [];
|
||||
for (var mangaId in mangaIds) {
|
||||
final trackSearch = isManga!
|
||||
|
|
|
|||
Loading…
Reference in a new issue