mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Remove warnings from MediaBrowser.LocalMetadata
This commit is contained in:
@@ -9,12 +9,21 @@ using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.LocalMetadata.Images
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal metadata folder image provider.
|
||||
/// </summary>
|
||||
public class InternalMetadataFolderImageProvider : ILocalImageProvider, IHasOrder
|
||||
{
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILogger<InternalMetadataFolderImageProvider> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InternalMetadataFolderImageProvider"/> class.
|
||||
/// </summary>
|
||||
/// <param name="config">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
|
||||
/// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
|
||||
/// <param name="logger">Instance of the <see cref="ILogger{InternalMetadataFolderImageProvider}"/> interface.</param>
|
||||
public InternalMetadataFolderImageProvider(
|
||||
IServerConfigurationManager config,
|
||||
IFileSystem fileSystem,
|
||||
@@ -25,8 +34,14 @@ namespace MediaBrowser.LocalMetadata.Images
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// Make sure this is last so that all other locations are scanned first
|
||||
/// <inheritdoc />
|
||||
public int Order => 1000;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Name => "Internal Images";
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Supports(BaseItem item)
|
||||
{
|
||||
if (item is Photo)
|
||||
@@ -52,9 +67,8 @@ namespace MediaBrowser.LocalMetadata.Images
|
||||
|
||||
return true;
|
||||
}
|
||||
// Make sure this is last so that all other locations are scanned first
|
||||
public int Order => 1000;
|
||||
|
||||
/// <inheritdoc />
|
||||
public List<LocalImageInfo> GetImages(BaseItem item, IDirectoryService directoryService)
|
||||
{
|
||||
var path = item.GetInternalMetadataPath();
|
||||
@@ -66,7 +80,7 @@ namespace MediaBrowser.LocalMetadata.Images
|
||||
|
||||
try
|
||||
{
|
||||
return new LocalImageProvider(_fileSystem).GetImages(item, path, false, directoryService);
|
||||
return new LocalImageProvider(_fileSystem).GetImages(item, path, directoryService);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user