mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-27 23:16:58 -04:00
Fixed: Use Array.Empty and fix a few multiple enumerations
(cherry picked from commit 11d91faaada0e70910c832ce405ddeed52a24172)
This commit is contained in:
@@ -44,11 +44,11 @@ namespace Prowlarr.Api.V1
|
||||
[Produces("application/json")]
|
||||
public List<TProviderResource> GetAll()
|
||||
{
|
||||
var providerDefinitions = _providerFactory.All().OrderBy(p => p.ImplementationName);
|
||||
var providerDefinitions = _providerFactory.All();
|
||||
|
||||
var result = new List<TProviderResource>(providerDefinitions.Count());
|
||||
var result = new List<TProviderResource>(providerDefinitions.Count);
|
||||
|
||||
foreach (var definition in providerDefinitions)
|
||||
foreach (var definition in providerDefinitions.OrderBy(p => p.ImplementationName))
|
||||
{
|
||||
_providerFactory.SetProviderCharacteristics(definition);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user