From 00c13e0dc12aa4752fefe48f8fdb714999f3377c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 29 Jul 2013 08:38:58 -0400 Subject: [PATCH] fixes #399 - MB Web Client - Tags Metadata --- .../Movies/MovieDbProvider.cs | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/MediaBrowser.Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Providers/Movies/MovieDbProvider.cs index 78c1960213..ea6bca9172 100644 --- a/MediaBrowser.Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Providers/Movies/MovieDbProvider.cs @@ -775,20 +775,22 @@ namespace MediaBrowser.Providers.Movies } } - movie.People.Clear(); - movie.Tags.Clear(); - - //Actors, Directors, Writers - all in People - //actors come from cast - if (movieData.casts != null && movieData.casts.cast != null && !movie.LockedFields.Contains(MetadataFields.Cast)) + if (!movie.LockedFields.Contains(MetadataFields.Cast)) { - foreach (var actor in movieData.casts.cast.OrderBy(a => a.order)) movie.AddPerson(new PersonInfo { Name = actor.name, Role = actor.character, Type = PersonType.Actor }); - } + movie.People.Clear(); - //and the rest from crew - if (movieData.casts != null && movieData.casts.crew != null) - { - foreach (var person in movieData.casts.crew) movie.AddPerson(new PersonInfo { Name = person.name, Role = person.job, Type = person.department }); + //Actors, Directors, Writers - all in People + //actors come from cast + if (movieData.casts != null && movieData.casts.cast != null) + { + foreach (var actor in movieData.casts.cast.OrderBy(a => a.order)) movie.AddPerson(new PersonInfo { Name = actor.name, Role = actor.character, Type = PersonType.Actor }); + } + + //and the rest from crew + if (movieData.casts != null && movieData.casts.crew != null) + { + foreach (var person in movieData.casts.crew) movie.AddPerson(new PersonInfo { Name = person.name, Role = person.job, Type = person.department }); + } } if (movieData.keywords != null && movieData.keywords.keywords != null && !movie.LockedFields.Contains(MetadataFields.Tags))