diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-10-12 15:43:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-12 15:43:28 -0400 |
| commit | 25ef9777cafee83c46ff53ede2caa04e3295e98a (patch) | |
| tree | 5f1e6045d0b4d4d5b7d8dcaadf035b326f36e672 /MediaBrowser.Api/ItemUpdateService.cs | |
| parent | 0677d4ec990aee9a3bf7bda39dda01eb6fa66281 (diff) | |
| parent | 5be6cf05e34459a046aceaa16c891f3034859476 (diff) | |
Merge pull request #2224 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Api/ItemUpdateService.cs')
| -rw-r--r-- | MediaBrowser.Api/ItemUpdateService.cs | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs index cda7ce0c6..687a21a46 100644 --- a/MediaBrowser.Api/ItemUpdateService.cs +++ b/MediaBrowser.Api/ItemUpdateService.cs @@ -243,11 +243,7 @@ namespace MediaBrowser.Api hasBudget.Revenue = request.Revenue; } - var hasOriginalTitle = item as IHasOriginalTitle; - if (hasOriginalTitle != null) - { - hasOriginalTitle.OriginalTitle = hasOriginalTitle.OriginalTitle; - } + item.OriginalTitle = string.IsNullOrWhiteSpace(request.OriginalTitle) ? null : request.OriginalTitle; var hasCriticRating = item as IHasCriticRating; if (hasCriticRating != null) @@ -278,10 +274,9 @@ namespace MediaBrowser.Api item.Tags = request.Tags; - var hasTaglines = item as IHasTaglines; - if (hasTaglines != null) + if (request.Taglines != null) { - hasTaglines.Taglines = request.Taglines; + item.Tagline = request.Taglines.FirstOrDefault(); } var hasShortOverview = item as IHasShortOverview; @@ -308,8 +303,6 @@ namespace MediaBrowser.Api item.OfficialRating = string.IsNullOrWhiteSpace(request.OfficialRating) ? null : request.OfficialRating; item.CustomRating = request.CustomRating; - SetProductionLocations(item, request); - item.PreferredMetadataCountryCode = request.PreferredMetadataCountryCode; item.PreferredMetadataLanguage = request.PreferredMetadataLanguage; @@ -417,23 +410,5 @@ namespace MediaBrowser.Api series.AirTime = request.AirTime; } } - - 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(); - } - } } } |
