prevent xml savers from triggering xml providers

This commit is contained in:
Luke Pulverenti
2013-12-06 10:59:40 -05:00
parent 5f0d8000a5
commit 9f4f2281cd
30 changed files with 55 additions and 100 deletions

View File

@@ -202,7 +202,7 @@ namespace MediaBrowser.Server.Implementations.Providers
{
if (item == null)
{
throw new ArgumentNullException();
throw new ArgumentNullException("item");
}
cancellationToken.ThrowIfCancellationRequested();
@@ -213,12 +213,9 @@ namespace MediaBrowser.Server.Implementations.Providers
_logger.Debug("Running {0} for {1}", provider.GetType().Name, item.Path ?? item.Name ?? "--Unknown--");
}
// This provides the ability to cancel just this one provider
var innerCancellationTokenSource = new CancellationTokenSource();
try
{
var changed = await provider.FetchAsync(item, force, CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, innerCancellationTokenSource.Token).Token).ConfigureAwait(false);
var changed = await provider.FetchAsync(item, force, cancellationToken).ConfigureAwait(false);
if (changed)
{
@@ -247,10 +244,6 @@ namespace MediaBrowser.Server.Implementations.Providers
return ItemUpdateType.Unspecified;
}
finally
{
innerCancellationTokenSource.Dispose();
}
}
/// <summary>