handle incomplete local metadata

This commit is contained in:
Luke Pulverenti 2015-02-25 13:11:49 -05:00
parent 7fd26410a9
commit 17ea0217f5
4 changed files with 44 additions and 2 deletions

View File

@ -397,7 +397,10 @@ namespace MediaBrowser.Providers.Manager
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport;
// Only one local provider allowed per item
hasLocalMetadata = true;
if (IsFullLocalMetadata(localItem.Item))
{
hasLocalMetadata = true;
}
successfulProviderCount++;
break;
}
@ -473,6 +476,11 @@ namespace MediaBrowser.Providers.Manager
return refreshResult;
}
protected virtual bool IsFullLocalMetadata(TItemType item)
{
return true;
}
private async Task ImportUserData(TItemType item, List<UserItemData> userDataList, CancellationToken cancellationToken)
{
var hasUserData = item as IHasUserData;

View File

@ -33,5 +33,22 @@ namespace MediaBrowser.Providers.Movies
target.TmdbCollectionName = source.TmdbCollectionName;
}
}
protected override bool IsFullLocalMetadata(Movie item)
{
if (string.IsNullOrWhiteSpace(item.Name))
{
return false;
}
if (string.IsNullOrWhiteSpace(item.Overview))
{
return false;
}
if (!item.ProductionYear.HasValue)
{
return false;
}
return base.IsFullLocalMetadata(item);
}
}
}

View File

@ -74,5 +74,22 @@ namespace MediaBrowser.Providers.TV
await provider.Run(item, CancellationToken.None).ConfigureAwait(false);
}
}
protected override bool IsFullLocalMetadata(Series item)
{
if (string.IsNullOrWhiteSpace(item.Name))
{
return false;
}
if (string.IsNullOrWhiteSpace(item.Overview))
{
return false;
}
if (!item.ProductionYear.HasValue)
{
return false;
}
return base.IsFullLocalMetadata(item);
}
}
}

View File

@ -442,7 +442,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
return null;
}
private const string InternalVersionNumber = "3";
private const string InternalVersionNumber = "4";
public Guid GetInternalChannelId(string serviceName, string externalId)
{