Skip to content

Commit

Permalink
fix(MangaDex): change the rating to nullable (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardSmit authored Feb 10, 2024
1 parent 6f04e91 commit 87ad3ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public MangaMetadataResult ConvertToMangaMetadataResult(MangaDexResponse<MangaDe
attributes.Description.En,
genres,
tags,
mangaDexStatistics.Rating.Average,
mangaDexStatistics.Rating.Average ?? mangaDexStatistics.Rating.Bayesian ?? 0.0,
GetCoverUrl(mangaDexData),
GetAnilistId(mangaDexData),
mangaDexData.Id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace MangaMagnet.Core.Providers.MangaDex.Models.Statistics;

public record MangaDexRating(
[property: JsonPropertyName("average")] double Average,
[property: JsonPropertyName("bayesian")] double Bayesian,
[property: JsonPropertyName("average")] double? Average,
[property: JsonPropertyName("bayesian")] double? Bayesian,
[property: JsonPropertyName("distribution")] MangaDexRatingDistribution Distribution
);
);

0 comments on commit 87ad3ba

Please sign in to comment.