Remove SimpleProgress

This commit is contained in:
Patrick Barron
2024-02-06 09:50:46 -05:00
parent 34a89fdefd
commit 8698b90594
11 changed files with 18 additions and 45 deletions

View File

@@ -1022,7 +1022,7 @@ namespace Emby.Server.Implementations.Library
// Start by just validating the children of the root, but go no further
await RootFolder.ValidateChildren(
new SimpleProgress<double>(),
new Progress<double>(),
new MetadataRefreshOptions(new DirectoryService(_fileSystem)),
recursive: false,
cancellationToken).ConfigureAwait(false);
@@ -1030,7 +1030,7 @@ namespace Emby.Server.Implementations.Library
await GetUserRootFolder().RefreshMetadata(cancellationToken).ConfigureAwait(false);
await GetUserRootFolder().ValidateChildren(
new SimpleProgress<double>(),
new Progress<double>(),
new MetadataRefreshOptions(new DirectoryService(_fileSystem)),
recursive: false,
cancellationToken).ConfigureAwait(false);
@@ -2954,7 +2954,7 @@ namespace Emby.Server.Implementations.Library
Task.Run(() =>
{
// No need to start if scanning the library because it will handle it
ValidateMediaLibrary(new SimpleProgress<double>(), CancellationToken.None);
ValidateMediaLibrary(new Progress<double>(), CancellationToken.None);
});
}

View File

@@ -14,7 +14,6 @@ using Jellyfin.Data.Events;
using Jellyfin.Extensions.Json;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Progress;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
@@ -371,7 +370,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
throw new InvalidOperationException("Cannot execute a Task that is already running");
}
var progress = new SimpleProgress<double>();
var progress = new Progress<double>();
CurrentCancellationTokenSource = new CancellationTokenSource();