save music brainz id in xml

This commit is contained in:
Luke Pulverenti 2013-06-24 10:12:56 -04:00
parent 8cbd735a9c
commit d828e07be0
2 changed files with 25 additions and 10 deletions

View File

@ -864,14 +864,7 @@ namespace MediaBrowser.Controller.Entities
/// <returns>IEnumerable{BaseItem}.</returns> /// <returns>IEnumerable{BaseItem}.</returns>
protected IEnumerable<BaseItem> GetCachedChildren() protected IEnumerable<BaseItem> GetCachedChildren()
{ {
var items = ItemRepository.GetChildren(Id).Select(RetrieveChild).Where(i => i != null).ToList(); return ItemRepository.GetChildren(Id).Select(RetrieveChild).Where(i => i != null);
foreach (var item in items)
{
item.Parent = this;
}
return items;
} }
/// <summary> /// <summary>
@ -893,7 +886,13 @@ namespace MediaBrowser.Controller.Entities
var item = LibraryManager.RetrieveItem(child.ItemId, itemType); 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> /// <summary>

View File

@ -417,6 +417,22 @@ namespace MediaBrowser.Controller.Providers
break; 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": case "TMDbId":
var tmdb = reader.ReadElementContentAsString(); var tmdb = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(tmdb)) if (!string.IsNullOrWhiteSpace(tmdb))
@ -424,7 +440,7 @@ namespace MediaBrowser.Controller.Providers
item.SetProviderId(MetadataProviders.Tmdb, tmdb); item.SetProviderId(MetadataProviders.Tmdb, tmdb);
} }
break; break;
case "CollectionNumber": case "CollectionNumber":
var tmdbCollection = reader.ReadElementContentAsString(); var tmdbCollection = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(tmdbCollection)) if (!string.IsNullOrWhiteSpace(tmdbCollection))