diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto/DtoService.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Dto/DtoService.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index e35504dcf..4d4aa2484 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -1102,16 +1102,21 @@ namespace MediaBrowser.Server.Implementations.Dto if (movie != null) { - var specialFeatureCount = movie.SpecialFeatureIds.Count; - - if (specialFeatureCount > 0) + if (fields.Contains(ItemFields.TmdbCollectionName)) { - dto.SpecialFeatureCount = specialFeatureCount; + dto.TmdbCollectionName = movie.TmdbCollectionName; } + } - if (fields.Contains(ItemFields.TmdbCollectionName)) + var hasSpecialFeatures = item as IHasSpecialFeatures; + + if (hasSpecialFeatures != null) + { + var specialFeatureCount = hasSpecialFeatures.SpecialFeatureIds.Count; + + if (specialFeatureCount > 0) { - dto.TmdbCollectionName = movie.TmdbCollectionName; + dto.SpecialFeatureCount = specialFeatureCount; } } @@ -1146,8 +1151,6 @@ namespace MediaBrowser.Server.Implementations.Dto dto.AirTime = series.AirTime; dto.Status = series.Status; - dto.SpecialFeatureCount = series.SpecialFeatureIds.Count; - dto.SeasonCount = series.SeasonCount; if (fields.Contains(ItemFields.Settings)) |
