|
|
|
@ -125,10 +125,21 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
|
|
|
|
|
|
|
|
|
|
validIds.Add(item.Id);
|
|
|
|
|
|
|
|
|
|
var hasMetdata = !string.IsNullOrWhiteSpace(item.Overview);
|
|
|
|
|
var performFullRefresh = !hasMetdata && (DateTime.UtcNow - item.DateLastRefreshed).TotalDays >= 7;
|
|
|
|
|
|
|
|
|
|
var defaultMetadataRefreshMode = performFullRefresh
|
|
|
|
|
? MetadataRefreshMode.FullRefresh
|
|
|
|
|
: MetadataRefreshMode.Default;
|
|
|
|
|
|
|
|
|
|
var imageRefreshMode = performFullRefresh
|
|
|
|
|
? ImageRefreshMode.FullRefresh
|
|
|
|
|
: ImageRefreshMode.Default;
|
|
|
|
|
|
|
|
|
|
var options = new MetadataRefreshOptions(_fileSystem)
|
|
|
|
|
{
|
|
|
|
|
MetadataRefreshMode = person.Value ? MetadataRefreshMode.Default : MetadataRefreshMode.ValidationOnly,
|
|
|
|
|
ImageRefreshMode = person.Value ? ImageRefreshMode.Default : ImageRefreshMode.ValidationOnly
|
|
|
|
|
MetadataRefreshMode = person.Value ? defaultMetadataRefreshMode : MetadataRefreshMode.ValidationOnly,
|
|
|
|
|
ImageRefreshMode = person.Value ? imageRefreshMode : ImageRefreshMode.ValidationOnly
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
await item.RefreshMetadata(options, cancellationToken).ConfigureAwait(false);
|
|
|
|
|