save music brainz id in xml
This commit is contained in:
parent
8cbd735a9c
commit
d828e07be0
|
@ -864,14 +864,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
protected IEnumerable<BaseItem> GetCachedChildren()
|
||||
{
|
||||
var items = ItemRepository.GetChildren(Id).Select(RetrieveChild).Where(i => i != null).ToList();
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.Parent = this;
|
||||
}
|
||||
|
||||
return items;
|
||||
return ItemRepository.GetChildren(Id).Select(RetrieveChild).Where(i => i != null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -893,7 +886,13 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
var item = LibraryManager.RetrieveItem(child.ItemId, itemType);
|
||||
|
||||
return item is IByReferenceItem ? LibraryManager.GetOrAddByReferenceItem(item) : item;
|
||||
if (item is IByReferenceItem)
|
||||
{
|
||||
return LibraryManager.GetOrAddByReferenceItem(item);
|
||||
}
|
||||
|
||||
item.Parent = this;
|
||||
return item;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -417,6 +417,22 @@ namespace MediaBrowser.Controller.Providers
|
|||
break;
|
||||
}
|
||||
|
||||
case "MusicbrainzId":
|
||||
var mbz = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(mbz))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.Musicbrainz, mbz);
|
||||
}
|
||||
break;
|
||||
|
||||
case "RottenTomatoesId":
|
||||
var rtId = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(rtId))
|
||||
{
|
||||
item.SetProviderId(MetadataProviders.RottenTomatoes, rtId);
|
||||
}
|
||||
break;
|
||||
|
||||
case "TMDbId":
|
||||
var tmdb = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(tmdb))
|
||||
|
@ -424,7 +440,7 @@ namespace MediaBrowser.Controller.Providers
|
|||
item.SetProviderId(MetadataProviders.Tmdb, tmdb);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case "CollectionNumber":
|
||||
var tmdbCollection = reader.ReadElementContentAsString();
|
||||
if (!string.IsNullOrWhiteSpace(tmdbCollection))
|
||||
|
|
Loading…
Reference in New Issue
Block a user