mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Sort indexers by name when syncing to applications
This commit is contained in:
@@ -127,6 +127,8 @@ namespace NzbDrone.Core.Applications
|
||||
|
||||
private void SyncIndexers(List<IApplication> applications, List<IndexerDefinition> 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;
|
||||
|
||||
|
Reference in New Issue
Block a user