diff options
| author | Stepan Goremykin <goremukin@gmail.com> | 2023-10-07 23:50:45 +0200 |
|---|---|---|
| committer | Stepan Goremykin <goremukin@gmail.com> | 2023-10-07 23:50:45 +0200 |
| commit | 73309f2649778e50709388e5208404c2dc71b30a (patch) | |
| tree | 7781a0ac384d0cba4ba1722e3bea34d3074e2a81 /Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs | |
| parent | 8925390ad4c9215755396a531263b654bed4d208 (diff) | |
Pass cancellation token
Diffstat (limited to 'Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs')
| -rw-r--r-- | Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs index 6ad6c4cbd..c4658c32b 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs @@ -115,7 +115,8 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks { try { - previouslyFailedImages = File.ReadAllText(failHistoryPath) + var failHistoryText = await File.ReadAllTextAsync(failHistoryPath, cancellationToken).ConfigureAwait(false); + previouslyFailedImages = failHistoryText .Split('|', StringSplitOptions.RemoveEmptyEntries) .ToList(); } @@ -156,7 +157,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks } string text = string.Join('|', previouslyFailedImages); - File.WriteAllText(failHistoryPath, text); + await File.WriteAllTextAsync(failHistoryPath, text, cancellationToken).ConfigureAwait(false); } numComplete++; |
