mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-28 02:37:40 +00:00
Fixed: Xbmc Metadata no longer fails when an actor has no image.
This commit is contained in:
parent
96b7847471
commit
da26fa8322
1 changed files with 9 additions and 4 deletions
|
@ -192,11 +192,16 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
|
||||||
|
|
||||||
foreach (var actor in series.Actors)
|
foreach (var actor in series.Actors)
|
||||||
{
|
{
|
||||||
tvShow.Add(new XElement("actor",
|
var xmlActor = new XElement("actor",
|
||||||
new XElement("name", actor.Name),
|
new XElement("name", actor.Name),
|
||||||
new XElement("role", actor.Character),
|
new XElement("role", actor.Character));
|
||||||
new XElement("thumb", actor.Images.First().Url)
|
|
||||||
));
|
if (actor.Images.Any())
|
||||||
|
{
|
||||||
|
xmlActor.Add(new XElement("thumb", actor.Images.First().Url));
|
||||||
|
}
|
||||||
|
|
||||||
|
tvShow.Add(xmlActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
var doc = new XDocument(tvShow);
|
var doc = new XDocument(tvShow);
|
||||||
|
|
Loading…
Reference in a new issue