From 797d24b34607b7500b7228670b80bc1308faa5e0 Mon Sep 17 00:00:00 2001 From: kookxiang Date: Thu, 28 Oct 2021 22:11:16 +0800 Subject: [PATCH] fix --- Jellyfin.Plugin.Bangumi/API/Episode.cs | 2 +- Jellyfin.Plugin.Bangumi/Providers/EpisodeProvider.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jellyfin.Plugin.Bangumi/API/Episode.cs b/Jellyfin.Plugin.Bangumi/API/Episode.cs index ee502e2..9d164fd 100644 --- a/Jellyfin.Plugin.Bangumi/API/Episode.cs +++ b/Jellyfin.Plugin.Bangumi/API/Episode.cs @@ -34,7 +34,7 @@ internal class Episode public string Description { get; set; } [JsonPropertyName("sort")] - public int Order { get; set; } + public double Order { get; set; } public string Status { get; set; } } diff --git a/Jellyfin.Plugin.Bangumi/Providers/EpisodeProvider.cs b/Jellyfin.Plugin.Bangumi/Providers/EpisodeProvider.cs index 3f004fc..b05e769 100644 --- a/Jellyfin.Plugin.Bangumi/Providers/EpisodeProvider.cs +++ b/Jellyfin.Plugin.Bangumi/Providers/EpisodeProvider.cs @@ -86,7 +86,7 @@ public async Task> GetMetadata(EpisodeInfo info, Cancell var episode = info.ProviderIds?.ContainsKey(Constants.ProviderName) == true ? episodeListData.Episodes.Find(x => $"{x.Id}" == info.ProviderIds[Constants.ProviderName]) - : episodeListData.Episodes.Find(x => x.Type == EpisodeType.Normal && x.Order == episodeIndex); + : episodeListData.Episodes.Find(x => x.Type == EpisodeType.Normal && (int)x.Order == episodeIndex); if (episode == null) return result; @@ -100,7 +100,7 @@ public async Task> GetMetadata(EpisodeInfo info, Cancell } result.Item.Name = episode.Name; - result.Item.IndexNumber = episode.Order; + result.Item.IndexNumber = (int)episode.Order; result.Item.Overview = episode.Description; return result;