From f4fa2517d2d389633f72d991ac581935d3dc6204 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 18 Oct 2024 23:12:57 +0300 Subject: [PATCH] Sort indexers by name when syncing to applications --- src/NzbDrone.Core/Applications/ApplicationService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Applications/ApplicationService.cs b/src/NzbDrone.Core/Applications/ApplicationService.cs index 97e627fd9..0a5a81fbd 100644 --- a/src/NzbDrone.Core/Applications/ApplicationService.cs +++ b/src/NzbDrone.Core/Applications/ApplicationService.cs @@ -127,6 +127,8 @@ namespace NzbDrone.Core.Applications private void SyncIndexers(List applications, List indexers, bool removeRemote = false, bool forceSync = false) { + var sortedIndexers = indexers.OrderBy(i => i.Name, StringComparer.OrdinalIgnoreCase).ToList(); + foreach (var app in applications) { var indexerMappings = _appIndexerMapService.GetMappingsForApp(app.Definition.Id); @@ -157,7 +159,7 @@ namespace NzbDrone.Core.Applications } } - foreach (var indexer in indexers) + foreach (var indexer in sortedIndexers) { var definition = indexer;