Investigate some TODO comments

This commit is contained in:
Bond_009
2022-11-23 15:58:11 +01:00
parent e1bd5684e5
commit 556cc8062d
8 changed files with 26 additions and 47 deletions

View File

@@ -16,6 +16,7 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.ScheduledTasks.Tasks
{
@@ -24,15 +25,10 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
/// </summary>
public class ChapterImagesTask : IScheduledTask
{
/// <summary>
/// The _library manager.
/// </summary>
private readonly ILogger _logger;
private readonly ILibraryManager _libraryManager;
private readonly IItemRepository _itemRepo;
private readonly IApplicationPaths _appPaths;
private readonly IEncodingManager _encodingManager;
private readonly IFileSystem _fileSystem;
private readonly ILocalizationManager _localization;
@@ -40,6 +36,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
/// <summary>
/// Initializes a new instance of the <see cref="ChapterImagesTask" /> class.
/// </summary>
/// <param name="logger">The logger.</param>.
/// <param name="libraryManager">The library manager.</param>.
/// <param name="itemRepo">The item repository.</param>
/// <param name="appPaths">The application paths.</param>
@@ -47,6 +44,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
/// <param name="fileSystem">The filesystem.</param>
/// <param name="localization">The localization manager.</param>
public ChapterImagesTask(
ILogger<ChapterImagesTask> logger,
ILibraryManager libraryManager,
IItemRepository itemRepo,
IApplicationPaths appPaths,
@@ -54,6 +52,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
IFileSystem fileSystem,
ILocalizationManager localization)
{
_logger = logger;
_libraryManager = libraryManager;
_itemRepo = itemRepo;
_appPaths = appPaths;
@@ -167,9 +166,10 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
progress.Report(100 * percent);
}
catch (ObjectDisposedException)
catch (ObjectDisposedException ex)
{
// TODO Investigate and properly fix.
_logger.LogError(ex, "Object Disposed");
break;
}
}