standardize check of DontFetchMeta within provider manager
This commit is contained in:
parent
d7791db5b3
commit
40a2af83c9
|
@ -204,8 +204,6 @@ namespace MediaBrowser.Controller.Providers
|
|||
throw new ArgumentNullException("providerInfo");
|
||||
}
|
||||
|
||||
if (item.DontFetchMeta && RequiresInternet) return false;
|
||||
|
||||
if (CompareDate(item) > providerInfo.LastRefreshed)
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -244,8 +244,6 @@ namespace MediaBrowser.Controller.Providers.Movies
|
|||
|
||||
protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
|
||||
{
|
||||
if (item.DontFetchMeta) return false;
|
||||
|
||||
if (HasAltMeta(item))
|
||||
return false; //never refresh if has meta from other source
|
||||
|
||||
|
@ -278,22 +276,10 @@ namespace MediaBrowser.Controller.Providers.Movies
|
|||
SetLastRefreshed(item, DateTime.UtcNow);
|
||||
return true;
|
||||
}
|
||||
if (item.DontFetchMeta)
|
||||
{
|
||||
Logger.Info("MovieDbProvider - Not fetching because requested to ignore " + item.Name);
|
||||
return false;
|
||||
}
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
if (!ConfigurationManager.Configuration.SaveLocalMeta || !HasLocalMeta(item) || (force && !HasLocalMeta(item)))
|
||||
{
|
||||
await FetchMovieData(item, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Debug("MovieDBProvider not fetching because local meta exists for " + item.Name);
|
||||
}
|
||||
await FetchMovieData(item, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
SetLastRefreshed(item, DateTime.UtcNow);
|
||||
return true;
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace MediaBrowser.Controller.Providers.TV
|
|||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
var episode = (Episode)item;
|
||||
if (!item.DontFetchMeta && !HasLocalMeta(episode))
|
||||
if (!HasLocalMeta(episode))
|
||||
{
|
||||
var seriesId = episode.Series != null ? episode.Series.GetProviderId(MetadataProviders.Tvdb) : null;
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ namespace MediaBrowser.Controller.Providers.TV
|
|||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
var series = (Series)item;
|
||||
if (!item.DontFetchMeta && !HasLocalMeta(series))
|
||||
if (!HasLocalMeta(series))
|
||||
{
|
||||
var path = item.Path ?? "";
|
||||
var seriesId = Path.GetFileName(path).GetAttributeValue("tvdbid") ?? await GetSeriesId(series, cancellationToken);
|
||||
|
|
|
@ -191,6 +191,11 @@ namespace MediaBrowser.Server.Implementations.Providers
|
|||
continue;
|
||||
}
|
||||
|
||||
if (provider.RequiresInternet && item.DontFetchMeta)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
currentTasks.Add(FetchAsync(provider, item, force, cancellationToken));
|
||||
currentPriority = provider.Priority;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user