Browse Source

ProviderManager: fix discard and 2 warnings

Bond_009 4 years ago
parent
commit
dcd6ab769b
1 changed files with 4 additions and 4 deletions
  1. 4 4
      MediaBrowser.Providers/Manager/ProviderManager.cs

+ 4 - 4
MediaBrowser.Providers/Manager/ProviderManager.cs

@@ -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)
             {
             {