Merge pull request #5384 from Larvitar/season-metadata-fix
This commit is contained in:
commit
83e492b72b
|
@ -213,9 +213,23 @@ namespace MediaBrowser.Providers.Manager
|
||||||
|
|
||||||
private void ApplySearchResult(ItemLookupInfo lookupInfo, RemoteSearchResult result)
|
private void ApplySearchResult(ItemLookupInfo lookupInfo, RemoteSearchResult result)
|
||||||
{
|
{
|
||||||
lookupInfo.ProviderIds = result.ProviderIds;
|
// Episode and Season do not support Identify, so the search results are the Series'
|
||||||
lookupInfo.Name = result.Name;
|
switch (lookupInfo)
|
||||||
lookupInfo.Year = result.ProductionYear;
|
{
|
||||||
|
case EpisodeInfo episodeInfo:
|
||||||
|
episodeInfo.SeriesProviderIds = result.ProviderIds;
|
||||||
|
episodeInfo.ProviderIds.Clear();
|
||||||
|
break;
|
||||||
|
case SeasonInfo seasonInfo:
|
||||||
|
seasonInfo.SeriesProviderIds = result.ProviderIds;
|
||||||
|
seasonInfo.ProviderIds.Clear();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
lookupInfo.ProviderIds = result.ProviderIds;
|
||||||
|
lookupInfo.Name = result.Name;
|
||||||
|
lookupInfo.Year = result.ProductionYear;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task SaveItemAsync(MetadataResult<TItemType> result, ItemUpdateType reason, CancellationToken cancellationToken)
|
protected async Task SaveItemAsync(MetadataResult<TItemType> result, ItemUpdateType reason, CancellationToken cancellationToken)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user