2013-06-27 19:29:58 +00:00
|
|
|
|
using MediaBrowser.Controller.Dto;
|
2013-06-27 19:06:37 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
|
using MediaBrowser.Controller.Entities.Audio;
|
|
|
|
|
using MediaBrowser.Controller.Entities.TV;
|
|
|
|
|
using MediaBrowser.Controller.Library;
|
2013-11-24 23:37:38 +00:00
|
|
|
|
using MediaBrowser.Controller.LiveTv;
|
2013-06-27 19:06:37 +00:00
|
|
|
|
using MediaBrowser.Model.Dto;
|
2013-07-01 16:00:00 +00:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
2013-12-07 15:52:38 +00:00
|
|
|
|
using ServiceStack;
|
2013-06-27 19:29:58 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2013-06-27 19:06:37 +00:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Api
|
|
|
|
|
{
|
|
|
|
|
[Route("/Items/{ItemId}", "POST")]
|
|
|
|
|
[Api(("Updates an item"))]
|
|
|
|
|
public class UpdateItem : BaseItemDto, IReturnVoid
|
|
|
|
|
{
|
|
|
|
|
[ApiMember(Name = "ItemId", Description = "The id of the item", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
|
|
|
|
public string ItemId { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Route("/Artists/{ArtistName}", "POST")]
|
|
|
|
|
[Api(("Updates an artist"))]
|
|
|
|
|
public class UpdateArtist : BaseItemDto, IReturnVoid
|
|
|
|
|
{
|
|
|
|
|
[ApiMember(Name = "ArtistName", Description = "The name of the item", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
|
|
|
|
public string ArtistName { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Route("/Studios/{StudioName}", "POST")]
|
|
|
|
|
[Api(("Updates a studio"))]
|
|
|
|
|
public class UpdateStudio : BaseItemDto, IReturnVoid
|
|
|
|
|
{
|
|
|
|
|
[ApiMember(Name = "StudioName", Description = "The name of the item", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
|
|
|
|
public string StudioName { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Route("/Persons/{PersonName}", "POST")]
|
|
|
|
|
[Api(("Updates a person"))]
|
|
|
|
|
public class UpdatePerson : BaseItemDto, IReturnVoid
|
|
|
|
|
{
|
|
|
|
|
[ApiMember(Name = "PersonName", Description = "The name of the item", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
|
|
|
|
public string PersonName { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Route("/MusicGenres/{GenreName}", "POST")]
|
|
|
|
|
[Api(("Updates a music genre"))]
|
|
|
|
|
public class UpdateMusicGenre : BaseItemDto, IReturnVoid
|
|
|
|
|
{
|
|
|
|
|
[ApiMember(Name = "GenreName", Description = "The name of the item", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
|
|
|
|
public string GenreName { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-01 17:17:33 +00:00
|
|
|
|
[Route("/GameGenres/{GenreName}", "POST")]
|
|
|
|
|
[Api(("Updates a game genre"))]
|
|
|
|
|
public class UpdateGameGenre : BaseItemDto, IReturnVoid
|
|
|
|
|
{
|
|
|
|
|
[ApiMember(Name = "GenreName", Description = "The name of the item", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
|
|
|
|
public string GenreName { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
[Route("/Genres/{GenreName}", "POST")]
|
|
|
|
|
[Api(("Updates a genre"))]
|
|
|
|
|
public class UpdateGenre : BaseItemDto, IReturnVoid
|
|
|
|
|
{
|
|
|
|
|
[ApiMember(Name = "GenreName", Description = "The name of the item", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
|
|
|
|
|
public string GenreName { get; set; }
|
|
|
|
|
}
|
2013-07-01 18:17:55 +00:00
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
public class ItemUpdateService : BaseApiService
|
|
|
|
|
{
|
|
|
|
|
private readonly ILibraryManager _libraryManager;
|
2013-09-04 17:02:19 +00:00
|
|
|
|
private readonly IDtoService _dtoService;
|
2013-11-24 23:37:38 +00:00
|
|
|
|
private readonly ILiveTvManager _liveTv;
|
2013-06-27 19:06:37 +00:00
|
|
|
|
|
2013-11-24 23:37:38 +00:00
|
|
|
|
public ItemUpdateService(ILibraryManager libraryManager, IDtoService dtoService, ILiveTvManager liveTv)
|
2013-06-27 19:06:37 +00:00
|
|
|
|
{
|
|
|
|
|
_libraryManager = libraryManager;
|
2013-09-04 17:02:19 +00:00
|
|
|
|
_dtoService = dtoService;
|
2013-11-24 23:37:38 +00:00
|
|
|
|
_liveTv = liveTv;
|
2013-06-27 19:06:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Post(UpdateItem request)
|
|
|
|
|
{
|
|
|
|
|
var task = UpdateItem(request);
|
|
|
|
|
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
}
|
|
|
|
|
|
2013-12-01 06:25:05 +00:00
|
|
|
|
private async Task UpdateItem(UpdateItem request)
|
2013-06-27 19:06:37 +00:00
|
|
|
|
{
|
2013-09-04 17:02:19 +00:00
|
|
|
|
var item = _dtoService.GetItemByDtoId(request.ItemId);
|
2013-06-27 19:06:37 +00:00
|
|
|
|
|
2013-12-01 06:25:05 +00:00
|
|
|
|
var newEnableInternetProviders = request.EnableInternetProviders ?? true;
|
|
|
|
|
var dontFetchMetaChanged = item.DontFetchMeta != !newEnableInternetProviders;
|
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
UpdateItem(request, item);
|
|
|
|
|
|
2013-12-01 06:25:05 +00:00
|
|
|
|
await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
|
|
|
|
|
|
|
|
|
if (dontFetchMetaChanged && item.IsFolder)
|
|
|
|
|
{
|
|
|
|
|
var folder = (Folder)item;
|
|
|
|
|
|
|
|
|
|
foreach (var child in folder.RecursiveChildren.ToList())
|
|
|
|
|
{
|
|
|
|
|
child.DontFetchMeta = !newEnableInternetProviders;
|
|
|
|
|
await _libraryManager.UpdateItem(child, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-06-27 19:06:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Post(UpdatePerson request)
|
|
|
|
|
{
|
|
|
|
|
var task = UpdateItem(request);
|
|
|
|
|
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task UpdateItem(UpdatePerson request)
|
|
|
|
|
{
|
2013-09-17 02:08:18 +00:00
|
|
|
|
var item = GetPerson(request.PersonName, _libraryManager);
|
2013-06-27 19:06:37 +00:00
|
|
|
|
|
|
|
|
|
UpdateItem(request, item);
|
|
|
|
|
|
2013-11-24 23:37:38 +00:00
|
|
|
|
await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
public void Post(UpdateArtist request)
|
|
|
|
|
{
|
|
|
|
|
var task = UpdateItem(request);
|
|
|
|
|
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task UpdateItem(UpdateArtist request)
|
|
|
|
|
{
|
2013-09-17 02:08:18 +00:00
|
|
|
|
var item = GetArtist(request.ArtistName, _libraryManager);
|
2013-06-27 19:06:37 +00:00
|
|
|
|
|
|
|
|
|
UpdateItem(request, item);
|
|
|
|
|
|
|
|
|
|
await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Post(UpdateStudio request)
|
|
|
|
|
{
|
|
|
|
|
var task = UpdateItem(request);
|
|
|
|
|
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task UpdateItem(UpdateStudio request)
|
|
|
|
|
{
|
2013-09-17 02:08:18 +00:00
|
|
|
|
var item = GetStudio(request.StudioName, _libraryManager);
|
2013-06-27 19:06:37 +00:00
|
|
|
|
|
|
|
|
|
UpdateItem(request, item);
|
|
|
|
|
|
|
|
|
|
await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Post(UpdateMusicGenre request)
|
|
|
|
|
{
|
|
|
|
|
var task = UpdateItem(request);
|
|
|
|
|
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task UpdateItem(UpdateMusicGenre request)
|
|
|
|
|
{
|
2013-09-17 02:08:18 +00:00
|
|
|
|
var item = GetMusicGenre(request.GenreName, _libraryManager);
|
2013-06-27 19:06:37 +00:00
|
|
|
|
|
|
|
|
|
UpdateItem(request, item);
|
|
|
|
|
|
|
|
|
|
await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-01 17:17:33 +00:00
|
|
|
|
public void Post(UpdateGameGenre request)
|
|
|
|
|
{
|
|
|
|
|
var task = UpdateItem(request);
|
|
|
|
|
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task UpdateItem(UpdateGameGenre request)
|
|
|
|
|
{
|
2013-09-17 02:08:18 +00:00
|
|
|
|
var item = GetGameGenre(request.GenreName, _libraryManager);
|
2013-07-01 17:17:33 +00:00
|
|
|
|
|
|
|
|
|
UpdateItem(request, item);
|
|
|
|
|
|
|
|
|
|
await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
public void Post(UpdateGenre request)
|
|
|
|
|
{
|
|
|
|
|
var task = UpdateItem(request);
|
|
|
|
|
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task UpdateItem(UpdateGenre request)
|
|
|
|
|
{
|
2013-09-17 02:08:18 +00:00
|
|
|
|
var item = GetGenre(request.GenreName, _libraryManager);
|
2013-06-27 19:06:37 +00:00
|
|
|
|
|
|
|
|
|
UpdateItem(request, item);
|
|
|
|
|
|
|
|
|
|
await _libraryManager.UpdateItem(item, ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void UpdateItem(BaseItemDto request, BaseItem item)
|
|
|
|
|
{
|
2013-07-06 23:08:32 +00:00
|
|
|
|
if (item.LocationType == LocationType.Offline)
|
|
|
|
|
{
|
|
|
|
|
throw new InvalidOperationException(string.Format("{0} is currently offline.", item.Name));
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
item.Name = request.Name;
|
|
|
|
|
|
|
|
|
|
// Only set the forced value if they changed it, or there's already one
|
|
|
|
|
if (!string.Equals(item.SortName, request.SortName) || !string.IsNullOrEmpty(item.ForcedSortName))
|
|
|
|
|
{
|
|
|
|
|
item.ForcedSortName = request.SortName;
|
|
|
|
|
}
|
|
|
|
|
|
2013-12-02 16:16:03 +00:00
|
|
|
|
var hasBudget = item as IHasBudget;
|
|
|
|
|
if (hasBudget != null)
|
|
|
|
|
{
|
|
|
|
|
hasBudget.Budget = request.Budget;
|
|
|
|
|
hasBudget.Revenue = request.Revenue;
|
|
|
|
|
}
|
2013-09-11 17:54:59 +00:00
|
|
|
|
|
2013-11-06 16:06:16 +00:00
|
|
|
|
var hasCriticRating = item as IHasCriticRating;
|
|
|
|
|
if (hasCriticRating != null)
|
|
|
|
|
{
|
|
|
|
|
hasCriticRating.CriticRating = request.CriticRating;
|
|
|
|
|
hasCriticRating.CriticRatingSummary = request.CriticRatingSummary;
|
|
|
|
|
}
|
2013-09-17 02:08:18 +00:00
|
|
|
|
|
2013-09-11 17:54:59 +00:00
|
|
|
|
item.DisplayMediaType = request.DisplayMediaType;
|
|
|
|
|
item.CommunityRating = request.CommunityRating;
|
2013-10-13 14:37:17 +00:00
|
|
|
|
item.VoteCount = request.VoteCount;
|
2013-09-11 17:54:59 +00:00
|
|
|
|
item.HomePageUrl = request.HomePageUrl;
|
2013-06-27 19:06:37 +00:00
|
|
|
|
item.IndexNumber = request.IndexNumber;
|
|
|
|
|
item.ParentIndexNumber = request.ParentIndexNumber;
|
|
|
|
|
item.Overview = request.Overview;
|
|
|
|
|
item.Genres = request.Genres;
|
2013-12-05 16:50:21 +00:00
|
|
|
|
|
2013-12-08 20:33:24 +00:00
|
|
|
|
var episode = item as Episode;
|
|
|
|
|
if (episode != null)
|
|
|
|
|
{
|
|
|
|
|
episode.DvdSeasonNumber = request.DvdSeasonNumber;
|
|
|
|
|
episode.DvdEpisodeNumber = request.DvdEpisodeNumber;
|
|
|
|
|
episode.AirsAfterSeasonNumber = request.AirsAfterSeasonNumber;
|
|
|
|
|
episode.AirsBeforeEpisodeNumber = request.AirsBeforeEpisodeNumber;
|
|
|
|
|
episode.AirsBeforeSeasonNumber = request.AirsBeforeSeasonNumber;
|
2013-12-10 20:42:42 +00:00
|
|
|
|
episode.AbsoluteEpisodeNumber = request.AbsoluteEpisodeNumber;
|
2013-12-08 20:33:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
2013-12-05 16:50:21 +00:00
|
|
|
|
var hasTags = item as IHasTags;
|
|
|
|
|
if (hasTags != null)
|
|
|
|
|
{
|
|
|
|
|
hasTags.Tags = request.Tags;
|
|
|
|
|
}
|
2013-11-24 23:37:38 +00:00
|
|
|
|
|
2014-01-14 15:50:39 +00:00
|
|
|
|
var hasKeywords = item as IHasKeywords;
|
|
|
|
|
if (hasKeywords != null)
|
|
|
|
|
{
|
|
|
|
|
hasKeywords.Keywords = request.Keywords;
|
|
|
|
|
}
|
|
|
|
|
|
2013-11-24 23:37:38 +00:00
|
|
|
|
if (request.Studios != null)
|
|
|
|
|
{
|
|
|
|
|
item.Studios = request.Studios.Select(x => x.Name).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (request.People != null)
|
|
|
|
|
{
|
|
|
|
|
item.People = request.People.Select(x => new PersonInfo { Name = x.Name, Role = x.Role, Type = x.Type }).ToList();
|
|
|
|
|
}
|
2013-06-27 19:06:37 +00:00
|
|
|
|
|
2013-09-03 14:26:17 +00:00
|
|
|
|
if (request.DateCreated.HasValue)
|
|
|
|
|
{
|
|
|
|
|
item.DateCreated = request.DateCreated.Value.ToUniversalTime();
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-20 20:33:09 +00:00
|
|
|
|
item.EndDate = request.EndDate.HasValue ? request.EndDate.Value.ToUniversalTime() : (DateTime?)null;
|
|
|
|
|
item.PremiereDate = request.PremiereDate.HasValue ? request.PremiereDate.Value.ToUniversalTime() : (DateTime?)null;
|
2013-06-27 19:06:37 +00:00
|
|
|
|
item.ProductionYear = request.ProductionYear;
|
|
|
|
|
item.OfficialRating = request.OfficialRating;
|
|
|
|
|
item.CustomRating = request.CustomRating;
|
2013-09-03 14:26:17 +00:00
|
|
|
|
|
2013-12-05 16:50:21 +00:00
|
|
|
|
SetProductionLocations(item, request);
|
|
|
|
|
|
2013-12-28 16:58:13 +00:00
|
|
|
|
var hasLang = item as IHasPreferredMetadataLanguage;
|
|
|
|
|
|
|
|
|
|
if (hasLang != null)
|
2013-12-05 16:50:21 +00:00
|
|
|
|
{
|
2013-12-28 16:58:13 +00:00
|
|
|
|
hasLang.PreferredMetadataCountryCode = request.PreferredMetadataCountryCode;
|
|
|
|
|
hasLang.PreferredMetadataLanguage = request.PreferredMetadataLanguage;
|
2013-12-05 16:50:21 +00:00
|
|
|
|
}
|
2014-01-03 20:32:27 +00:00
|
|
|
|
|
|
|
|
|
var hasDisplayOrder = item as IHasDisplayOrder;
|
|
|
|
|
if (hasDisplayOrder != null)
|
|
|
|
|
{
|
|
|
|
|
hasDisplayOrder.DisplayOrder = request.DisplayOrder;
|
|
|
|
|
}
|
2013-12-05 16:50:21 +00:00
|
|
|
|
|
2013-11-20 03:15:48 +00:00
|
|
|
|
var hasAspectRatio = item as IHasAspectRatio;
|
|
|
|
|
if (hasAspectRatio != null)
|
|
|
|
|
{
|
|
|
|
|
hasAspectRatio.AspectRatio = request.AspectRatio;
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
item.DontFetchMeta = !(request.EnableInternetProviders ?? true);
|
|
|
|
|
if (request.EnableInternetProviders ?? true)
|
|
|
|
|
{
|
|
|
|
|
item.LockedFields = request.LockedFields;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
item.LockedFields.Clear();
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-13 18:37:44 +00:00
|
|
|
|
// Only allow this for series. Runtimes for media comes from ffprobe.
|
|
|
|
|
if (item is Series)
|
|
|
|
|
{
|
|
|
|
|
item.RunTimeTicks = request.RunTimeTicks;
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
foreach (var pair in request.ProviderIds.ToList())
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(pair.Value))
|
|
|
|
|
{
|
|
|
|
|
request.ProviderIds.Remove(pair.Key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
item.ProviderIds = request.ProviderIds;
|
|
|
|
|
|
2013-07-29 12:34:46 +00:00
|
|
|
|
var video = item as Video;
|
|
|
|
|
if (video != null)
|
|
|
|
|
{
|
|
|
|
|
video.Video3DFormat = request.Video3DFormat;
|
|
|
|
|
}
|
2013-09-03 14:26:17 +00:00
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
var game = item as Game;
|
|
|
|
|
|
|
|
|
|
if (game != null)
|
|
|
|
|
{
|
|
|
|
|
game.PlayersSupported = request.Players;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var song = item as Audio;
|
|
|
|
|
|
|
|
|
|
if (song != null)
|
|
|
|
|
{
|
|
|
|
|
song.Album = request.Album;
|
|
|
|
|
song.AlbumArtist = request.AlbumArtist;
|
2013-09-05 19:00:50 +00:00
|
|
|
|
song.Artists = request.Artists.ToList();
|
2013-06-27 19:06:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
2013-07-10 20:10:55 +00:00
|
|
|
|
var musicVideo = item as MusicVideo;
|
|
|
|
|
|
|
|
|
|
if (musicVideo != null)
|
|
|
|
|
{
|
|
|
|
|
musicVideo.Artist = request.Artists[0];
|
|
|
|
|
musicVideo.Album = request.Album;
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-27 19:06:37 +00:00
|
|
|
|
var series = item as Series;
|
|
|
|
|
if (series != null)
|
|
|
|
|
{
|
|
|
|
|
series.Status = request.Status;
|
|
|
|
|
series.AirDays = request.AirDays;
|
|
|
|
|
series.AirTime = request.AirTime;
|
2013-12-10 21:26:30 +00:00
|
|
|
|
|
|
|
|
|
if (request.DisplaySpecialsWithSeasons.HasValue)
|
|
|
|
|
{
|
|
|
|
|
series.DisplaySpecialsWithSeasons = request.DisplaySpecialsWithSeasons.Value;
|
|
|
|
|
}
|
2013-06-27 19:06:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-12-05 16:50:21 +00:00
|
|
|
|
private void SetProductionLocations(BaseItem item, BaseItemDto request)
|
|
|
|
|
{
|
|
|
|
|
var hasProductionLocations = item as IHasProductionLocations;
|
|
|
|
|
|
|
|
|
|
if (hasProductionLocations != null)
|
|
|
|
|
{
|
|
|
|
|
hasProductionLocations.ProductionLocations = request.ProductionLocations;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var person = item as Person;
|
|
|
|
|
if (person != null)
|
|
|
|
|
{
|
|
|
|
|
person.PlaceOfBirth = request.ProductionLocations == null
|
|
|
|
|
? null
|
|
|
|
|
: request.ProductionLocations.FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-06-27 19:06:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|