Fix MAL "No Cover" Exception

```
NoSuchMethodError: The method '[]' was called on null.
Receiver: null
Tried calling []("large")
```
This commit is contained in:
NBA2K1 2025-08-17 20:55:15 +02:00
parent f88978219f
commit 85751538ac

View file

@ -159,7 +159,7 @@ class MyAnimeList extends _$MyAnimeList {
mediaId: res["id"],
summary: res["synopsis"] ?? "",
totalChapter: res[contentUnit],
coverUrl: res["main_picture"]["large"] ?? "",
coverUrl: res["main_picture"]?["large"] ?? "",
title: res["title"],
startDate: res["start_date"] ?? "",
publishingType: res["media_type"].toString().replaceAll("_", " "),
@ -197,7 +197,7 @@ class MyAnimeList extends _$MyAnimeList {
mediaId: node["id"],
summary: node["synopsis"] ?? "",
totalChapter: node[contentUnit],
coverUrl: node["main_picture"]["large"] ?? "",
coverUrl: node["main_picture"]?["large"] ?? "",
title: node["title"],
score: (node["mean"] as num?)?.toDouble(),
startDate: node["start_date"] ?? "",
@ -237,7 +237,7 @@ class MyAnimeList extends _$MyAnimeList {
mediaId: node["id"],
summary: node["synopsis"] ?? "",
totalChapter: node[contentUnit],
coverUrl: node["main_picture"]["large"] ?? "",
coverUrl: node["main_picture"]?["large"] ?? "",
title: node["title"],
score: (node["mean"] as num?)?.toDouble(),
startDate: node["start_date"] ?? "",