ease up on comparison data causing refrehes
This commit is contained in:
parent
2ac714e761
commit
2e9abb2e35
|
@ -134,12 +134,6 @@ namespace MediaBrowser.Providers.Movies
|
|||
return false;
|
||||
}
|
||||
|
||||
// Refresh if tmdb id has changed
|
||||
if (providerInfo.Data != GetComparisonData(item.GetProviderId(MetadataProviders.Tmdb)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Don't refresh if we already have both poster and backdrop and we're not refreshing images
|
||||
if (item.HasImage(ImageType.Primary) && item.BackdropImagePaths.Count > 0)
|
||||
{
|
||||
|
@ -170,21 +164,10 @@ namespace MediaBrowser.Providers.Movies
|
|||
|
||||
var status = await ProcessImages(item, images, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
data.Data = GetComparisonData(item.GetProviderId(MetadataProviders.Tmdb));
|
||||
|
||||
SetLastRefreshed(item, DateTime.UtcNow, status);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the comparison data.
|
||||
/// </summary>
|
||||
/// <returns>Guid.</returns>
|
||||
private Guid GetComparisonData(string id)
|
||||
{
|
||||
return string.IsNullOrEmpty(id) ? Guid.Empty : id.GetMD5();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetches the images.
|
||||
/// </summary>
|
||||
|
|
|
@ -91,16 +91,6 @@ namespace MediaBrowser.Providers.Movies
|
|||
return item is Movie || item is MusicVideo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the comparison data.
|
||||
/// </summary>
|
||||
/// <param name="imdbId">The imdb id.</param>
|
||||
/// <returns>Guid.</returns>
|
||||
private Guid GetComparisonData(string imdbId)
|
||||
{
|
||||
return string.IsNullOrEmpty(imdbId) ? Guid.Empty : imdbId.GetMD5();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the priority.
|
||||
/// </summary>
|
||||
|
@ -114,23 +104,6 @@ namespace MediaBrowser.Providers.Movies
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Needses the refresh internal.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="providerInfo">The provider info.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
||||
protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
|
||||
{
|
||||
// Refresh if imdb id has changed
|
||||
if (providerInfo.Data != GetComparisonData(item.GetProviderId(MetadataProviders.Imdb)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.NeedsRefreshInternal(item, providerInfo);
|
||||
}
|
||||
|
||||
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||
|
||||
public override async Task<bool> FetchAsync(BaseItem item, bool force, CancellationToken cancellationToken)
|
||||
|
@ -147,7 +120,6 @@ namespace MediaBrowser.Providers.Movies
|
|||
|
||||
if (string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
data.Data = GetComparisonData(imdbId);
|
||||
data.LastRefreshStatus = ProviderRefreshStatus.Success;
|
||||
return true;
|
||||
}
|
||||
|
@ -181,7 +153,6 @@ namespace MediaBrowser.Providers.Movies
|
|||
}
|
||||
}
|
||||
|
||||
data.Data = GetComparisonData(item.GetProviderId(MetadataProviders.Imdb));
|
||||
data.LastRefreshStatus = ProviderRefreshStatus.Success;
|
||||
SetLastRefreshed(item, DateTime.UtcNow);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user