fixes #502 - Add date added to edit page

This commit is contained in:
Luke Pulverenti 2013-09-03 10:26:17 -04:00
parent 4f53d2fd23
commit 765884efb4

View File

@ -222,6 +222,11 @@ namespace MediaBrowser.Api
item.Studios = request.Studios.Select(x => x.Name).ToList(); item.Studios = request.Studios.Select(x => x.Name).ToList();
item.People = request.People.Select(x => new PersonInfo { Name = x.Name, Role = x.Role, Type = x.Type }).ToList(); item.People = request.People.Select(x => new PersonInfo { Name = x.Name, Role = x.Role, Type = x.Type }).ToList();
if (request.DateCreated.HasValue)
{
item.DateCreated = request.DateCreated.Value.ToUniversalTime();
}
item.EndDate = request.EndDate.HasValue ? request.EndDate.Value.ToUniversalTime() : (DateTime?)null; item.EndDate = request.EndDate.HasValue ? request.EndDate.Value.ToUniversalTime() : (DateTime?)null;
item.PremiereDate = request.PremiereDate.HasValue ? request.PremiereDate.Value.ToUniversalTime() : (DateTime?)null; item.PremiereDate = request.PremiereDate.HasValue ? request.PremiereDate.Value.ToUniversalTime() : (DateTime?)null;
item.ProductionYear = request.ProductionYear; item.ProductionYear = request.ProductionYear;
@ -230,7 +235,7 @@ namespace MediaBrowser.Api
item.Language = request.Language; item.Language = request.Language;
item.OfficialRating = request.OfficialRating; item.OfficialRating = request.OfficialRating;
item.CustomRating = request.CustomRating; item.CustomRating = request.CustomRating;
item.DontFetchMeta = !(request.EnableInternetProviders ?? true); item.DontFetchMeta = !(request.EnableInternetProviders ?? true);
if (request.EnableInternetProviders ?? true) if (request.EnableInternetProviders ?? true)
{ {
@ -256,7 +261,7 @@ namespace MediaBrowser.Api
{ {
video.Video3DFormat = request.Video3DFormat; video.Video3DFormat = request.Video3DFormat;
} }
var game = item as Game; var game = item as Game;
if (game != null) if (game != null)