mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
Merge pull request #5867 from Bond-009/provider
ProviderManager: fix discard and 2 warnings
This commit is contained in:
commit
86a2e6eeda
@ -1021,26 +1021,26 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
// TODO: Need to hunt down the conditions for this happening
|
// TODO: Need to hunt down the conditions for this happening
|
||||||
_activeRefreshes.AddOrUpdate(
|
_activeRefreshes.AddOrUpdate(
|
||||||
id,
|
id,
|
||||||
(_) => throw new Exception(
|
(_) => throw new InvalidOperationException(
|
||||||
string.Format(
|
string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
"Cannot update refresh progress of item '{0}' ({1}) because a refresh for this item is not running",
|
"Cannot update refresh progress of item '{0}' ({1}) because a refresh for this item is not running",
|
||||||
item.GetType().Name,
|
item.GetType().Name,
|
||||||
item.Id.ToString("N", CultureInfo.InvariantCulture))),
|
item.Id.ToString("N", CultureInfo.InvariantCulture))),
|
||||||
(_, __) => progress);
|
(_, _) => progress);
|
||||||
|
|
||||||
RefreshProgress?.Invoke(this, new GenericEventArgs<Tuple<BaseItem, double>>(new Tuple<BaseItem, double>(item, progress)));
|
RefreshProgress?.Invoke(this, new GenericEventArgs<Tuple<BaseItem, double>>(new Tuple<BaseItem, double>(item, progress)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void QueueRefresh(Guid id, MetadataRefreshOptions options, RefreshPriority priority)
|
public void QueueRefresh(Guid itemId, MetadataRefreshOptions options, RefreshPriority priority)
|
||||||
{
|
{
|
||||||
if (_disposed)
|
if (_disposed)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_refreshQueue.Enqueue(new Tuple<Guid, MetadataRefreshOptions>(id, options), (int)priority);
|
_refreshQueue.Enqueue(new Tuple<Guid, MetadataRefreshOptions>(itemId, options), (int)priority);
|
||||||
|
|
||||||
lock (_refreshQueueLock)
|
lock (_refreshQueueLock)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user