FxCop -> Net Analyzers (part 2)

This commit is contained in:
Bond_009
2021-03-09 05:57:38 +01:00
parent 260b48ef9d
commit a8ed753f6c
70 changed files with 151 additions and 213 deletions

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
@@ -69,13 +70,13 @@ namespace MediaBrowser.LocalMetadata.Images
}
/// <inheritdoc />
public List<LocalImageInfo> GetImages(BaseItem item, IDirectoryService directoryService)
public IEnumerable<LocalImageInfo> GetImages(BaseItem item, IDirectoryService directoryService)
{
var path = item.GetInternalMetadataPath();
if (!Directory.Exists(path))
{
return new List<LocalImageInfo>();
return Enumerable.Empty<LocalImageInfo>();
}
try
@@ -85,7 +86,7 @@ namespace MediaBrowser.LocalMetadata.Images
catch (IOException ex)
{
_logger.LogError(ex, "Error while getting images for {Library}", item.Name);
return new List<LocalImageInfo>();
return Enumerable.Empty<LocalImageInfo>();
}
}
}