diff --git a/API/Schema/MangaConnectors/MangaDex.cs b/API/Schema/MangaConnectors/MangaDex.cs index 6c46efb..f552d49 100644 --- a/API/Schema/MangaConnectors/MangaDex.cs +++ b/API/Schema/MangaConnectors/MangaDex.cs @@ -228,8 +228,8 @@ public class MangaDex : MangaConnector string? id = jToken.Value("id"); JObject? attributes = jToken["attributes"] as JObject; - string? name = attributes?["title"]?.Value("en")??attributes?["title"]?.First?.Value(); - string? description = attributes?["description"]?.Value("en")??attributes?["description"]?.First?.Value(); + string? name = attributes?["title"]?.Value("en") ?? attributes?["title"]?.First?.First?.Value(); + string? description = attributes?["description"]?.Value("en")??attributes?["description"]?.First?.First?.Value(); string? status = attributes?["status"]?.Value(); uint? year = attributes?["year"]?.Value(); string? originalLanguage = attributes?["originalLanguage"]?.Value(); @@ -288,7 +288,7 @@ public class MangaDex : MangaConnector List tags = tagsJArray .Where(t => t.Value("type") == "tag") - .Select(t => t["attributes"]?["name"]?.Value("en")??t["attributes"]?["name"]?.First?.Value()) + .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()!;