Remove local metadata stop logic
This commit is contained in:
parent
f5a8fca22f
commit
9145be6bfc
|
@ -751,9 +751,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
[JsonIgnore]
|
||||
public virtual bool SupportsAncestors => true;
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual bool StopRefreshIfLocalMetadataFound => true;
|
||||
|
||||
[JsonIgnore]
|
||||
protected virtual bool SupportsOwnedItems => !ParentId.IsEmpty() && IsFileProtocol;
|
||||
|
||||
|
|
|
@ -45,9 +45,6 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||
set => TmdbCollectionName = value;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public override bool StopRefreshIfLocalMetadataFound => false;
|
||||
|
||||
public override double GetDefaultPrimaryImageAspectRatio()
|
||||
{
|
||||
// hack for tv plugins
|
||||
|
|
|
@ -72,9 +72,6 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||
/// <value>The status.</value>
|
||||
public SeriesStatus? Status { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public override bool StopRefreshIfLocalMetadataFound => false;
|
||||
|
||||
public override double GetDefaultPrimaryImageAspectRatio()
|
||||
{
|
||||
double value = 2;
|
||||
|
|
|
@ -23,9 +23,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
TrailerTypes = Array.Empty<TrailerType>();
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public override bool StopRefreshIfLocalMetadataFound => false;
|
||||
|
||||
public TrailerType[] TrailerTypes { get; set; }
|
||||
|
||||
public override double GetDefaultPrimaryImageAspectRatio()
|
||||
|
|
|
@ -730,9 +730,8 @@ namespace MediaBrowser.Providers.Manager
|
|||
}
|
||||
}
|
||||
|
||||
var hasLocalBaseMetadata = HasBaseMetadata(temp.Item);
|
||||
var isLocalLocked = temp.Item.IsLocked;
|
||||
if (!isLocalLocked && !(hasLocalBaseMetadata && item.StopRefreshIfLocalMetadataFound) && (options.ReplaceAllMetadata || options.MetadataRefreshMode == MetadataRefreshMode.FullRefresh))
|
||||
if (!isLocalLocked && (options.ReplaceAllMetadata || options.MetadataRefreshMode == MetadataRefreshMode.FullRefresh))
|
||||
{
|
||||
var remoteResult = await ExecuteRemoteProviders(temp, logName, false, id, providers.OfType<IRemoteMetadataProvider<TItemType, TIdType>>(), cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
|
@ -773,16 +772,6 @@ namespace MediaBrowser.Providers.Manager
|
|||
return refreshResult;
|
||||
}
|
||||
|
||||
protected virtual bool HasBaseMetadata(TItemType item)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.Name))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private async Task RunCustomProvider(ICustomMetadataProvider<TItemType> provider, TItemType item, string logName, MetadataRefreshOptions options, RefreshResult refreshResult, CancellationToken cancellationToken)
|
||||
{
|
||||
Logger.LogDebug("Running {Provider} for {Item}", provider.GetType().Name, logName);
|
||||
|
|
|
@ -23,22 +23,6 @@ namespace MediaBrowser.Providers.Movies
|
|||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool HasBaseMetadata(Movie item)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.Overview))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!item.ProductionYear.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.HasBaseMetadata(item);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void MergeData(MetadataResult<Movie> source, MetadataResult<Movie> target, MetadataField[] lockedFields, bool replaceData, bool mergeMetadataSettings)
|
||||
{
|
||||
|
|
|
@ -24,22 +24,6 @@ namespace MediaBrowser.Providers.Movies
|
|||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool HasBaseMetadata(Trailer item)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.Overview))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!item.ProductionYear.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.HasBaseMetadata(item);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void MergeData(MetadataResult<Trailer> source, MetadataResult<Trailer> target, MetadataField[] lockedFields, bool replaceData, bool mergeMetadataSettings)
|
||||
{
|
||||
|
|
|
@ -208,27 +208,6 @@ namespace MediaBrowser.Providers.Music
|
|||
return updateType;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool HasBaseMetadata(MusicAlbum item)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.Album))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.AlbumArtists.Count == 0 && item.Artists.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!item.ProductionYear.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.HasBaseMetadata(item);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void MergeData(
|
||||
MetadataResult<MusicAlbum> source,
|
||||
|
|
|
@ -49,27 +49,6 @@ namespace MediaBrowser.Providers.Music
|
|||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool HasBaseMetadata(Audio item)
|
||||
{
|
||||
if (item.IndexNumber is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(item.Album))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.AlbumArtists.Count == 0 && item.Artists.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.HasBaseMetadata(item);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void MergeData(MetadataResult<Audio> source, MetadataResult<Audio> target, MetadataField[] lockedFields, bool replaceData, bool mergeMetadataSettings)
|
||||
{
|
||||
|
|
|
@ -67,22 +67,6 @@ namespace MediaBrowser.Providers.TV
|
|||
return updatedType;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool HasBaseMetadata(Episode item)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.Overview))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.IndexNumber is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.HasBaseMetadata(item);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void MergeData(MetadataResult<Episode> source, MetadataResult<Episode> target, MetadataField[] lockedFields, bool replaceData, bool mergeMetadataSettings)
|
||||
{
|
||||
|
|
|
@ -99,21 +99,5 @@ namespace MediaBrowser.Providers.TV
|
|||
|
||||
return ItemUpdateType.None;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool HasBaseMetadata(Season item)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.Overview))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.IndexNumber is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.HasBaseMetadata(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,22 +65,6 @@ namespace MediaBrowser.Providers.TV
|
|||
await UpdateAndCreateSeasonsAsync(item, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool HasBaseMetadata(Series item)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.Overview))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!item.ProductionYear.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.HasBaseMetadata(item);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void MergeData(MetadataResult<Series> source, MetadataResult<Series> target, MetadataField[] lockedFields, bool replaceData, bool mergeMetadataSettings)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user