Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kookxiang committed Oct 28, 2021
1 parent 264f674 commit 797d24b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Jellyfin.Plugin.Bangumi/API/Episode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Expand Down
4 changes: 2 additions & 2 deletions Jellyfin.Plugin.Bangumi/Providers/EpisodeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public async Task<MetadataResult<Episode>> 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;

Expand All @@ -100,7 +100,7 @@ public async Task<MetadataResult<Episode>> 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;
Expand Down

0 comments on commit 797d24b

Please sign in to comment.