Skip to content

Commit

Permalink
fix: fix episode group ordering for files
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed May 12, 2024
1 parent bbbce06 commit 3923fa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shokofin/API/ShokoAPIManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ private Task<FileInfo> CreateFileInfo(File file, string fileId, string seriesId)
var groupedEpisodeLists = episodeList
.GroupBy(tuple => (type: tuple.Episode.AniDB.Type, percentage: tuple.CrossReference.Percentage?.Size ?? 100))
.OrderByDescending(a => Array.IndexOf(EpisodePickOrder, a.Key.type))
.ThenByDescending(a => Array.IndexOf(EpisodePickOrder, a.Key.percentage))
.ThenByDescending(a => a.Key.percentage)
.Select(epList => epList.OrderBy(tuple => tuple.Episode.AniDB.EpisodeNumber).ToList())
.ToList();
Expand Down

0 comments on commit 3923fa8

Please sign in to comment.