mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
Fix possible race condition
This commit is contained in:
parent
6d6fa13550
commit
d1e1aef5f7
@ -970,9 +970,8 @@ namespace MediaBrowser.Providers.Manager
|
||||
var id = item.Id;
|
||||
_logger.LogInformation("OnRefreshProgress {0} {1}", id.ToString("N", CultureInfo.InvariantCulture), progress);
|
||||
|
||||
if (_activeRefreshes.ContainsKey(id))
|
||||
if (_activeRefreshes.TryAdd(id, progress))
|
||||
{
|
||||
_activeRefreshes[id] = progress;
|
||||
RefreshProgress?.Invoke(this, new GenericEventArgs<Tuple<BaseItem, double>>(new Tuple<BaseItem, double>(item, progress)));
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user