Allocate less Lists

This commit is contained in:
Bond_009
2023-03-01 00:44:57 +01:00
parent 54cd3e6d55
commit 4b01aaa0f7
24 changed files with 76 additions and 89 deletions

View File

@@ -284,12 +284,12 @@ namespace MediaBrowser.Providers.Manager
}
catch (OperationCanceledException)
{
return new List<RemoteImageInfo>();
return Enumerable.Empty<RemoteImageInfo>();
}
catch (Exception ex)
{
_logger.LogError(ex, "{ProviderName} failed in GetImageInfos for type {ItemType} at {ItemPath}", provider.GetType().Name, item.GetType().Name, item.Path);
return new List<RemoteImageInfo>();
return Enumerable.Empty<RemoteImageInfo>();
}
}