mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 06:18:28 +01:00
rework refresh queue
This commit is contained in:
@@ -1817,7 +1817,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <returns>Task.</returns>
|
||||
public virtual Task ChangedExternally()
|
||||
{
|
||||
ProviderManager.QueueRefresh(Id, new MetadataRefreshOptions(FileSystem));
|
||||
ProviderManager.QueueRefresh(Id, new MetadataRefreshOptions(FileSystem), RefreshPriority.High);
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
/// <summary>
|
||||
/// Queues the refresh.
|
||||
/// </summary>
|
||||
/// <param name="itemId">The item identifier.</param>
|
||||
/// <param name="options">The options.</param>
|
||||
void QueueRefresh(Guid itemId, MetadataRefreshOptions options);
|
||||
void QueueRefresh(Guid itemId, MetadataRefreshOptions options, RefreshPriority priority);
|
||||
|
||||
/// <summary>
|
||||
/// Refreshes the full item.
|
||||
@@ -161,4 +159,11 @@ namespace MediaBrowser.Controller.Providers
|
||||
/// <returns>Task{HttpResponseInfo}.</returns>
|
||||
Task<HttpResponseInfo> GetSearchImage(string providerName, string url, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
public enum RefreshPriority
|
||||
{
|
||||
High = 0,
|
||||
Normal = 1,
|
||||
Low = 2
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user