mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
change usage reporting to a timer
This commit is contained in:
@@ -142,7 +142,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
// Refresh songs
|
||||
foreach (var item in songs)
|
||||
{
|
||||
if (tasks.Count >= 2)
|
||||
if (tasks.Count >= 3)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
tasks.Clear();
|
||||
@@ -166,7 +166,8 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
}
|
||||
});
|
||||
|
||||
tasks.Add(RefreshItem(item, refreshOptions, innerProgress, cancellationToken));
|
||||
var taskChild = item;
|
||||
tasks.Add(Task.Run(async () => await RefreshItem(taskChild, refreshOptions, innerProgress, cancellationToken).ConfigureAwait(false), cancellationToken));
|
||||
}
|
||||
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
@@ -178,7 +179,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
// Refresh all non-songs
|
||||
foreach (var item in others)
|
||||
{
|
||||
if (tasks.Count > 4)
|
||||
if (tasks.Count > 3)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
tasks.Clear();
|
||||
|
||||
@@ -142,6 +142,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [supports local metadata]; otherwise, <c>false</c>.</value>
|
||||
bool SupportsLocalMetadata { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is in mixed folder.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is in mixed folder; otherwise, <c>false</c>.</value>
|
||||
bool IsInMixedFolder { get; }
|
||||
}
|
||||
|
||||
public static class HasImagesExtensions
|
||||
|
||||
Reference in New Issue
Block a user