From de36ce9c16b566978da94caee2944d8e7a9bee44 Mon Sep 17 00:00:00 2001 From: glax Date: Tue, 22 Jul 2025 21:09:31 +0200 Subject: [PATCH] Fix MangaDex null --- API/MangaConnectors/MangaDex.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/API/MangaConnectors/MangaDex.cs b/API/MangaConnectors/MangaDex.cs index cc78dfe..47c30d5 100644 --- a/API/MangaConnectors/MangaDex.cs +++ b/API/MangaConnectors/MangaDex.cs @@ -277,9 +277,9 @@ public class MangaDex : MangaConnector _ => kv.Key }; return new Link(key, url); - }).ToList()!; + }).ToList()??[]; - List altTitles = (altTitlesJArray??[]) + List altTitles = altTitlesJArray? .Select(t => { JObject? j = t as JObject; @@ -287,19 +287,19 @@ public class MangaDex : MangaConnector if (p is null) return null; return new AltTitle(p.Name, p.Value.ToString()); - }).Where(x => x is not null).ToList()!; + }).Where(x => x is not null).Cast().ToList()??[]; - List tags = (tagsJArray??[]) + List tags = tagsJArray? .Where(t => t.Value("type") == "tag") .Select(t => t["attributes"]?["name"]?.Value("en")??t["attributes"]?["name"]?.First?.First?.Value()) .Select(str => str is not null ? new MangaTag(str) : null) - .Where(x => x is not null).ToList()!; + .Where(x => x is not null).Cast().ToList()??[]; List authors = relationships .Where(r => r["type"]?.Value() == "author") .Select(t => t["attributes"]?.Value("name")) .Select(str => str is not null ? new Author(str) : null) - .Where(x => x is not null).ToList()!; + .Where(x => x is not null).Cast().ToList(); MangaReleaseStatus releaseStatus = status switch