From b406dc0118b2a4f4de7ac5db5d3ce29c1b26038b Mon Sep 17 00:00:00 2001 From: tidusjar Date: Mon, 5 Jul 2021 14:20:25 +0100 Subject: [PATCH] Fixed the issue where the first scan has the potential to not get all the shows depending on the order of the plex libraries --- src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs index 8333eed56..928baa0c3 100644 --- a/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs +++ b/src/Ombi.Schedule/Jobs/Plex/PlexContentSync.cs @@ -175,7 +175,7 @@ namespace Ombi.Schedule.Jobs.Plex var allEps = Repo.GetAllEpisodes(); - foreach (var content in allContent) + foreach (var content in allContent.OrderByDescending(x => x.viewGroup)) { Logger.LogDebug($"Got type '{content.viewGroup}' to process"); if (content.viewGroup.Equals(PlexMediaType.Episode.ToString(), StringComparison.InvariantCultureIgnoreCase))