Remove ActionableProgress

This commit is contained in:
Patrick Barron
2024-02-06 09:58:25 -05:00
parent 8698b90594
commit 0960438065
4 changed files with 8 additions and 61 deletions

View File

@@ -13,7 +13,6 @@ using System.Threading.Tasks.Dataflow;
using Jellyfin.Data.Entities;
using Jellyfin.Data.Enums;
using Jellyfin.Extensions;
using MediaBrowser.Common.Progress;
using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Collections;
using MediaBrowser.Controller.Configuration;
@@ -429,10 +428,8 @@ namespace MediaBrowser.Controller.Entities
if (recursive)
{
var innerProgress = new ActionableProgress<double>();
var folder = this;
innerProgress.RegisterAction(innerPercent =>
var innerProgress = new Progress<double>(innerPercent =>
{
var percent = ProgressHelpers.GetProgress(ProgressHelpers.UpdatedChildItems, ProgressHelpers.ScannedSubfolders, innerPercent);
@@ -461,10 +458,8 @@ namespace MediaBrowser.Controller.Entities
var container = this as IMetadataContainer;
var innerProgress = new ActionableProgress<double>();
var folder = this;
innerProgress.RegisterAction(innerPercent =>
var innerProgress = new Progress<double>(innerPercent =>
{
var percent = ProgressHelpers.GetProgress(ProgressHelpers.ScannedSubfolders, ProgressHelpers.RefreshedMetadata, innerPercent);
@@ -572,9 +567,7 @@ namespace MediaBrowser.Controller.Entities
var actionBlock = new ActionBlock<int>(
async i =>
{
var innerProgress = new ActionableProgress<double>();
innerProgress.RegisterAction(innerPercent =>
var innerProgress = new Progress<double>(innerPercent =>
{
// round the percent and only update progress if it changed to prevent excessive UpdateProgress calls
var innerPercentRounded = Math.Round(innerPercent);