mirror of
https://github.com/jellyfin/jellyfin-plugin-kitsu.git
synced 2024-11-27 00:00:35 +00:00
Round community rating to single decimal place (#18)
This commit is contained in:
parent
97ea3eef7f
commit
db2fcd1d46
@ -78,7 +78,7 @@ namespace Jellyfin.Plugin.Anime.Providers.KitsuIO.Metadata
|
||||
// KitsuIO has a max rating of 100
|
||||
CommunityRating = string.IsNullOrWhiteSpace(seriesInfo.Data.Attributes.AverageRating)
|
||||
? null
|
||||
: (float?) float.Parse(seriesInfo.Data.Attributes.AverageRating, System.Globalization.CultureInfo.InvariantCulture) / 10,
|
||||
: MathF.Round(float.Parse(seriesInfo.Data.Attributes.AverageRating, System.Globalization.CultureInfo.InvariantCulture) / 10, 1),
|
||||
ProviderIds = new Dictionary<string, string>() {{"Kitsu", kitsuId}},
|
||||
Genres = seriesInfo.Included?.Select(x => x.Attributes.Name).ToArray()
|
||||
?? Array.Empty<string>()
|
||||
|
Loading…
Reference in New Issue
Block a user