diff options
| author | Brian J. Murrell <brian@interlinx.bc.ca> | 2021-11-29 17:53:26 -0500 |
|---|---|---|
| committer | Brian J. Murrell <brian@interlinx.bc.ca> | 2021-11-29 17:53:26 -0500 |
| commit | 757970bfc17b0eb1566b45fbe700dcb16423b190 (patch) | |
| tree | 63fbc171621f5ec7ae156f341d9b1df37643deac /Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs | |
| parent | a3a4689af22693b535e80b98624831866fda2a61 (diff) | |
| parent | c677b4f6b7f7e874097aa2cee866d9ed1e574178 (diff) | |
Merge remote-tracking branch 'origin/master' into HEAD
Diffstat (limited to 'Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs')
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs index 2312c85d9..09ea6271d 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs @@ -39,6 +39,12 @@ namespace Emby.Server.Implementations.ScheduledTasks /// <summary> /// Initializes a new instance of the <see cref="ChapterImagesTask" /> class. /// </summary> + /// <param name="libraryManager">The library manager.</param>. + /// <param name="itemRepo">The item repository.</param> + /// <param name="appPaths">The application paths.</param> + /// <param name="encodingManager">The encoding manager.</param> + /// <param name="fileSystem">The filesystem.</param> + /// <param name="localization">The localization manager.</param> public ChapterImagesTask( ILibraryManager libraryManager, IItemRepository itemRepo, @@ -55,9 +61,19 @@ namespace Emby.Server.Implementations.ScheduledTasks _localization = localization; } - /// <summary> - /// Creates the triggers that define when the task will run. - /// </summary> + /// <inheritdoc /> + public string Name => _localization.GetLocalizedString("TaskRefreshChapterImages"); + + /// <inheritdoc /> + public string Description => _localization.GetLocalizedString("TaskRefreshChapterImagesDescription"); + + /// <inheritdoc /> + public string Category => _localization.GetLocalizedString("TasksLibraryCategory"); + + /// <inheritdoc /> + public string Key => "RefreshChapterImages"; + + /// <inheritdoc /> public IEnumerable<TaskTriggerInfo> GetDefaultTriggers() { return new[] @@ -140,8 +156,10 @@ namespace Emby.Server.Implementations.ScheduledTasks previouslyFailedImages.Add(key); var parentPath = Path.GetDirectoryName(failHistoryPath); - - Directory.CreateDirectory(parentPath); + if (parentPath != null) + { + Directory.CreateDirectory(parentPath); + } string text = string.Join('|', previouslyFailedImages); File.WriteAllText(failHistoryPath, text); @@ -160,26 +178,5 @@ namespace Emby.Server.Implementations.ScheduledTasks } } } - - /// <inheritdoc /> - public string Name => _localization.GetLocalizedString("TaskRefreshChapterImages"); - - /// <inheritdoc /> - public string Description => _localization.GetLocalizedString("TaskRefreshChapterImagesDescription"); - - /// <inheritdoc /> - public string Category => _localization.GetLocalizedString("TasksLibraryCategory"); - - /// <inheritdoc /> - public string Key => "RefreshChapterImages"; - - /// <inheritdoc /> - public bool IsHidden => false; - - /// <inheritdoc /> - public bool IsEnabled => true; - - /// <inheritdoc /> - public bool IsLogged => true; } } |
