mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 07:18:47 +01:00
minor cleanup
This commit is contained in:
@@ -152,7 +152,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
// Refresh songs
|
||||
foreach (var item in songs)
|
||||
{
|
||||
if (tasks.Count > 3)
|
||||
if (tasks.Count >= 2)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
tasks.Clear();
|
||||
|
||||
@@ -518,7 +518,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
foreach (var child in children)
|
||||
{
|
||||
if (tasks.Count > 5)
|
||||
if (tasks.Count >= 2)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
tasks.Clear();
|
||||
@@ -596,15 +596,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
var percentages = new Dictionary<Guid, double>(list.Count);
|
||||
|
||||
var tasks = new List<Task>();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (tasks.Count > 10)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
var child = item;
|
||||
@@ -624,12 +617,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
});
|
||||
|
||||
tasks.Add(child.ValidateChildrenWithCancellationSupport(innerProgress, cancellationToken, true, false, null));
|
||||
await child.ValidateChildrenWithCancellationSupport(innerProgress, cancellationToken, true, false, null)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
// Refresh songs
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (tasks.Count > 3)
|
||||
if (tasks.Count >= 2)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
tasks.Clear();
|
||||
|
||||
Reference in New Issue
Block a user